Page 1 of 1

select widget

PostPosted: Thu Oct 27, 2011 12:14 pm
by pie
Hello

two little questions:

1. Is it possible to remove the "please select" from a select widget so that it just gives the options?

2. is it possible to put a select widget in the navigation pane?

kind regards
P

Re: select widget

PostPosted: Thu Oct 27, 2011 8:21 pm
by ADobkin
pie wrote:1. Is it possible to remove the "please select" from a select widget so that it just gives the options?


You would have to modify the source to Xataface to do this. Refer to the file ./Dataface/FormTool/select.php, lines 17-18. I am not sure what all the repercussions would be without testing it. If you modify this file directly, it will affect all select widgets in your installation. You could try duplicating this file to roll your own separate select widget and then referencing which one you need. Or, if you have PHP coding skills, you could make it an optional parameter that could be configured on a per-field basis in fields.ini. If you do this, please consider sharing your results here.

pie wrote:2. is it possible to put a select widget in the navigation pane?


This would probably also require some customization and creative coding skills.

Re: select widget

PostPosted: Fri Oct 28, 2011 9:22 am
by shannah
You could also just set a default value for that field. The "please select..." option would then still be there, but it wouldn't be selected by default so most people wouldn't notice it.

Re: select widget

PostPosted: Fri Oct 28, 2011 9:22 am
by shannah
Alternatively you could use javascript to remove this option on page load.

Re: select widget

PostPosted: Wed Nov 02, 2011 1:35 am
by pie
Shannah, how do I set a default value for that field?

Re: select widget

PostPosted: Wed Nov 02, 2011 4:16 am
by ADobkin
pie wrote:how do I set a default value for that field?


It is specified in MySQL, along with the data type for that column.