a select with an input

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

a select with an input

Postby Jean » Mon Jun 09, 2008 12:04 am

Hi Steve,
Is there a shortcut to add an input field to a select one, so that a user can add a new input if an item is not yet included inside the select list ?
Thank you
Jean
Jean
 
Posts: 259
Joined: Wed Nov 07, 2007 1:30 am
Location: Pau, France

Postby shannah » Mon Jun 09, 2008 9:01 am

Hi Jean,

I don't have a "nice" solution for this widget at this time. I do have "a" solution though if you are using a valuelist that is drawn from the database (i.e. it uses __sql__).

This is a snippet from the manual on editable select lists:

\subsubsection{Editable Select Lists}

If the valuelist that is used to define the options for a select list is dynamic (i.e. its values are pulled from the database), then a select list can be made editable using the widget:editvalues directive. If this is enabled, then the select list will contain an extra option at the end of the list labeled "Edit Values ...". Selecting this option will provide the user with a pop-up prompt to enter a new value for the select list. This is handy if you have a field where you want the user to select from existing options most of the time, but if their option is not listed you want them to be able to add their own option.

An example with the eyeColor field to make it into an editable select list follows:

Code: Select all
[eyeColor]
    widget:type=select
    widget:editvalues=1
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby Jean » Tue Jun 10, 2008 5:24 am

Thanks again Steve
Jean
 
Posts: 259
Joined: Wed Nov 07, 2007 1:30 am
Location: Pau, France


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 24 guests

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