Select widget, supress "Other/add New"

A place for users and developers of the Xataface to discuss and receive support.

Select widget, supress "Other/add New"

Postby 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.
jonbfl
 
Posts: 66
Joined: Thu Jul 28, 2011 8:20 pm

Re: Select widget, supress "Other/add New"

Postby 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
ctripp
 
Posts: 7
Joined: Mon Nov 14, 2011 8:50 pm

Re: Select widget, supress "Other/add New"

Postby 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

8)
jonbfl
 
Posts: 66
Joined: Thu Jul 28, 2011 8:20 pm

Re: Select widget, supress "Other/add New"

Postby 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.
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 13 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved