set custom attributes serverside

Post any questions you have about using the Verj.io Studio, including client and server-side programming with Javascript or FPL, and integration with databases, web services etc.

Moderators: Jon, Steve, Ian, Dave

Steve James
Ebase User
Posts: 331
Joined: Mon Mar 10, 2014 8:34 am

set custom attributes serverside

#1

Postby Steve James » Tue Jun 19, 2018 9:00 am

Hi, is it possible to set custom attributes server side? I've got an input field and want to set the placeholder with a count of records eg "search 506 datasets...."

I've tried field substitution and it doesn't work. I haven't found anything obvious in controls.Field.

Thanks
0 x

Segi
Ebase User
Posts: 649
Joined: Mon Dec 09, 2013 6:37 pm

Re: set custom attributes serverside

#2

Postby Segi » Tue Jun 19, 2018 3:03 pm

Can you please elaborate exactly on what you're trying to do ?
0 x

Steve James
Ebase User
Posts: 331
Joined: Mon Mar 10, 2014 8:34 am

Re: set custom attributes serverside

#3

Postby Steve James » Tue Jun 19, 2018 4:59 pm

Placeholder ie https://www.w3schools.com/tags/att_inpu ... holder.asp

I want to set the value at runtime. I can do it client side, just wondered if I can set it in a server side script.

Thanks
0 x

Segi
Ebase User
Posts: 649
Joined: Mon Dec 09, 2013 6:37 pm

Re: set custom attributes serverside

#4

Postby Segi » Tue Jun 19, 2018 8:02 pm

You could do it on the server side if you use an HTML control and set the HTML inside of the HTML control exactly how you want it to render
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

Re: set custom attributes serverside

#5

Postby Jon » Wed Jun 20, 2018 7:53 am

You can't do it via the server API e.g. you can't use controls.fieldControl.xxx.

You could do it on the client using jQuery and then insert the jQuery Javascript using an HTML control or something similar. But then it becomes increasingly messy.
0 x

Steve James
Ebase User
Posts: 331
Joined: Mon Mar 10, 2014 8:34 am

Re: set custom attributes serverside

#6

Postby Steve James » Thu Jun 21, 2018 5:03 pm

Thanks Jon.
Thinking about it I only need to update the placeholder once a day (when I run a scheduled import).

The real cheaty way would be to update the appropriate file in the workspace 8) :lol:
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

Re: set custom attributes serverside

#7

Postby Jon » Fri Jun 22, 2018 8:35 am

Yes it would work but I don't think I would do it. Just gives you a potential maintenance problem going forward.
I prefer the jQuery approach with a document.onload event.
0 x

Steve James
Ebase User
Posts: 331
Joined: Mon Mar 10, 2014 8:34 am

Re: set custom attributes serverside

#8

Postby Steve James » Mon Jun 25, 2018 8:00 am

Thanks Jon, I'll end up doing it via an HTTP control and not via an Ebase field.
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

Re: set custom attributes serverside

#9

Postby Jon » Fri Jul 20, 2018 1:57 pm

In V5.4 we have added the ability to put replaceable &&fieldname in custom attributes
0 x

Segi
Ebase User
Posts: 649
Joined: Mon Dec 09, 2013 6:37 pm

Re: set custom attributes serverside

#10

Postby Segi » Thu Jul 26, 2018 4:48 pm

Jon,

When do you think that 5.4 will be released ?
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

Re: set custom attributes serverside

#11

Postby Jon » Fri Jul 27, 2018 7:38 am

We are aiming to release V5.4 by 10th Aug.
0 x

User avatar
dvanhussel
Ebase User
Posts: 161
Joined: Fri Oct 19, 2007 12:45 pm
Location: Haarlem, the Netherlands

Re: set custom attributes serverside

#12

Postby dvanhussel » Mon Sep 03, 2018 10:04 am

Is there any news on this? When can we expect to be able to download the upgrade package for V5.4.

Regards,

David
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

Re: set custom attributes serverside

#13

Postby Jon » Mon Sep 03, 2018 11:10 am

Sorry about this, we've postponed it till the beginning of October.
0 x


Who is online

Users browsing this forum: No registered users and 9 guests