Combo box - issue with required field validation on first option selection
Last Post 02-08-2012 10:35 AM by mattd_br. 3 Replies.
AddThis - Bookmarking and Sharing Button
Author Messages Resolved
mattd_brUser is Offline
skipping stones
skipping stones
Posts:11
Avatar

--
02-08-2012 06:42 AM
    I am using a combo box with SQL driven options to select the region (province/state) determined on the selected country. I am not using the DNN region for this as I have multiple combinations of this on the same form, whereas DNN region/DNN country is restricted to a single instance per form.

    The default country is Canada, and the first province listed is Alberta. The province field is required for form submission. The form is not recognizing the entry ‘Alberta’. You can select any other province and submit. You can select any other province and then Alberta again and still can’t submit (claims that the province field is required; is interpreting it as not having a value??)

    How do I maintain required validation on the field but allow the first option listed to be chosen? I can’t add a ‘null entry’ or ‘Select one’ entry as I’m using the built-in DNN Lists table for possible values. I don’t want to add dummy entries to this table.

    Thanks,
    Matt
    CandaceUser is Offline
    river guide
    river guide
    Posts:2431
    Avatar

    --
    02-08-2012 08:42 AM
    Hi Matt,

    Whenever a combobox is set to required, it will ignore the first option. My suggestion is to not use the standard DNN country and region fields but use regular comboboxes instead. This blog post will help you set it up:

    http://www.datasprings.com/news/blo...box-in-dyn

    Thanks!
    Candace
    Chad NashUser is Offline
    Posts:5260
    Avatar

    --
    02-08-2012 09:09 AM
    Hi Matt,

    Just adding a note to what Candace said - If you add a "Select Item" then set the field as required, if you don't have a "Select Item" then don't set the field as required (since there is no initial blank/select option then there is no reason to make it required since the user would have to select an item since there is no blank option)


    Thanks!

    -Chad
    mattd_brUser is Offline
    skipping stones
    skipping stones
    Posts:11
    Avatar

    --
    02-08-2012 10:35 AM
    Understood. In this case I'll simply remove the required validation. I guess it makes sense; even if they ignore the field it will get populated with the first visible option (Alberta in this case).


    ---
  • film izle
  • 720 izle
  • film
  • sinema izle
  • film makinesi
  • T�rk�e dublaj film
  • film izle
  • film izle
  • baglan film izle
  • sinema izle
  • 1080 film izle
  • film mercegi