Select widget, supress “Other/add New”
Archived from the Xataface Users forum.
jonbfl — Mon Oct 17, 2011 12:35 pm
In one of our applications, we don’t want editors/preparers adding arbitrary codes (lookups) while using the Select Widget.
We have a controlled access app for editing tables.
What’s the most straightforward way to disable all ‘Other(Add)’ functionality in a given app wherever the Select widget lookup is used?
I looked for a preference that might control this, but I must be barking up the wrong tree.
OK may have found it
http://xataface.com/wiki/fields.ini_file
editvalues? Used with select lists to allow users to add values to the select list. E.g. editvalues=1
- well wrongo - it does not seem to matter which value I have, 1 or 0 - I still get the ‘other’ option and it works…
fields.ini
- Code: Select all
[codigo_pais] widget:type = select vocabulary = pais editvalues = 0
I “thought” thi swould suppress the ‘Other’
Thanks for any all all suggestions.
ctripp — Sat Nov 19, 2011 2:06 am
This post may help as you could edit the select.php file (located in the/xataface/Dataface/FormTool folder) to make the change globally.
viewtopic.php?f=4&t=6411
However I think the preferred way to limit this functionality is with permissions.
-Clayton
jonbfl — Tue Nov 22, 2011 12:31 pm
Thanks for that post -
LOL - I had concluded from Steve’s silence this was a permissions issue, I simply have not had time to work it out (annual budgets, plus beta user training and documentation - all in two languages)
I’m going to tackle getting that ‘right’ after I get the folks working on meta-data table input.
Thanks again - and Happy Thanksgiving
shannah — Tue Nov 22, 2011 3:36 pm
Yes. Permissions is the best way to limit users from adding records. If you disable the new permission for the table from which the values in the select are retrieved, then you’ll prevent them from adding new records.