[Portfolio] Form validation question
Noah Botimer
botimer at umich.edu
Tue Jan 25 09:42:49 PST 2011
We have actually done exactly this (including an "other" option for write-ins). The question is...
Dave, do you need to update the valid set of options so that content stays in sync? Or is the drop-down mostly about an appropriate/convenient set of options at creation/editing time?
On the technical side, the upshot is this:
All of the forms of a given type should conform to their schema. If, for example, the field is required and an option that has been used is removed/changed, there would then be invalid forms (which is actually checked and disallowed). Adding options is okay. On the other hand, you can (as Sean suggests) use a text field that isn't validated and support it with a select box (with JavaScript). While not technically being validated, the nominal case is that the user will pick from the list and keep your data clean (enough).
Thanks,
-Noah
On Jan 24, 2011, at 4:31 PM, Sean Keesler wrote:
> With the default form renderer, a select box is created when you have
> a string with enumerated choices as an element.
> It seems like you could create a custom renderer that would create a
> select box for just that string field...and not validate it against an
> enumerated list.
>
> Sean Keesler
> 130 Academy Street
> Manlius, NY 13104
> 315-682-0830
> sean.keesler at threecanoes.com
>
>
>
>
>
> On Mon, Jan 24, 2011 at 3:56 PM, David McPherson <dmcphers at vt.edu> wrote:
>> Hi,
>>
>> I'm working on a way to dynamically update a drop down list on a portfolio form. I've got the list to update from an xml file, but when I select one of the options form the dynamically generated list, the validation of the form fails, indicating that the option I chose wasn't a valid choice, i.e. wasn't in the list. So my question is, does anyone know where the validation takes place? I'd like to see if I can modify this to also compare against my external list.
>>
>> Thanks,
>> Dave
>> --
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> David McPherson
>> Assistant Director, ePortfolio Initiatives
>> 2210A Torgersen Hall
>> Learning Technologies
>> dmcphers at vt.edu
>> 540-231-8993
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> portfolio mailing list
>> portfolio at collab.sakaiproject.org
>> http://collab.sakaiproject.org/mailman/listinfo/portfolio
>>
>> TO UNSUBSCRIBE: send email to portfolio-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"
>>
> _______________________________________________
> portfolio mailing list
> portfolio at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/portfolio
>
> TO UNSUBSCRIBE: send email to portfolio-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"
>
>
More information about the portfolio
mailing list