Page 1 of 1

1.2.6 add new records to valuelist

PostPosted: Mon Feb 21, 2011 2:26 pm
by olivyeah
In 1.2.6 description
-Added the ability to add new records to valuelists for select widgets inline... but only if the valuelist uses __sql__ to pull its values from the database.

was not working for me..

In Dataface/FormTool/select.php near ligne 90
I changed $widget['suffix'] to $widget['description'] and it work great now... Looks like there's a problem with the (unknow) 'suffix' directive.

It's a really realy useful ability to me ... But ... Is there a way to desactivate it for choosen fields ?



Re: 1.2.6 add new records to valuelist

PostPosted: Wed Feb 23, 2011 10:25 am
by shannah
Did you override some of the form templates with your own templates. The suffix should work (it is used in the form template). Moving it to the "description" attribute will work, but will overwrite any widget:description you had set for that field.

For disabling this, it is just tied to the "new" permission on the table that contains the valuelist values. If the user is denied the "new" permission on this table, then they won't be able to add new values to the valuelist.

I'll see about adding additional overrides to disable this in future releases.