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
set custom attributes serverside
Moderators: Jon, Steve, Ian, Dave
-
- Ebase User
- Posts: 331
- Joined: Mon Mar 10, 2014 8:34 am
-
- Ebase User
- Posts: 649
- Joined: Mon Dec 09, 2013 6:37 pm
Re: set custom attributes serverside
Can you please elaborate exactly on what you're trying to do ?
0 x
-
- Ebase User
- Posts: 331
- Joined: Mon Mar 10, 2014 8:34 am
Re: set custom attributes serverside
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
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
-
- Ebase User
- Posts: 649
- Joined: Mon Dec 09, 2013 6:37 pm
Re: set custom attributes serverside
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
-
- Moderator
- Posts: 1342
- Joined: Wed Sep 12, 2007 12:49 pm
Re: set custom attributes serverside
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.
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
-
- Ebase User
- Posts: 331
- Joined: Mon Mar 10, 2014 8:34 am
Re: set custom attributes serverside
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
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
0 x
-
- Moderator
- Posts: 1342
- Joined: Wed Sep 12, 2007 12:49 pm
Re: set custom attributes serverside
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.
I prefer the jQuery approach with a document.onload event.
0 x
-
- Ebase User
- Posts: 331
- Joined: Mon Mar 10, 2014 8:34 am
Re: set custom attributes serverside
Thanks Jon, I'll end up doing it via an HTTP control and not via an Ebase field.
0 x
-
- Moderator
- Posts: 1342
- Joined: Wed Sep 12, 2007 12:49 pm
Re: set custom attributes serverside
In V5.4 we have added the ability to put replaceable &&fieldname in custom attributes
0 x
-
- Ebase User
- Posts: 649
- Joined: Mon Dec 09, 2013 6:37 pm
-
- Moderator
- Posts: 1342
- Joined: Wed Sep 12, 2007 12:49 pm
- dvanhussel
- Ebase User
- Posts: 161
- Joined: Fri Oct 19, 2007 12:45 pm
- Location: Haarlem, the Netherlands
Re: set custom attributes serverside
Is there any news on this? When can we expect to be able to download the upgrade package for V5.4.
Regards,
David
Regards,
David
0 x
-
- Moderator
- Posts: 1342
- Joined: Wed Sep 12, 2007 12:49 pm
Re: set custom attributes serverside
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 6 guests