ComboList with No default value still shows 1st entry
Last Post 09-06-2011 09:49 AM by Candace. 1 Replies.
AddThis - Bookmarking and Sharing Button
Author Messages Not Resolved
Rob NiessenUser is Offline
skipping stones
skipping stones
Posts:7
Avatar

--
08-20-2011 10:29 PM
    Hi,

    I got a simple combolist with 2 (or more values) using settings:
    - "no default value":
    - Validation : required

    But when i 'render' the form i see 1st value in ComboList.

    1st, i do not want to have a value preselected.
    Also, now it looks like  a selection is made and after submit form 'required' event is fired with message "this field is required"

    When i tried to add empty value (eg 1 space) in the combolist and set that as default value then a question event is fired (which ony should happen when user makes a choice and not before that

    Any ideas/suggestions?

    Thx & regards,
    Rob

    DNN 05.06.03 (45)
    DNF 3.40.50
    CandaceUser is Offline
    river guide
    river guide
    Posts:2431
    Avatar

    --
    09-06-2011 09:49 AM
    Hi Rob,

    A combobox set to required will always select the first option as default. If you do not want that to happen, you can use a - Please select - as the first opton with a value of -1.

    If you're using SQL, you can use something like this:

    Select '- Select Item - ' as QuestionOption, ' ' as QuestionOptionValue
    Union All
    select Text as QuestionOption, Text as QuestionOptionValue from Lists where ListName= 'Region'

    Hope that helps!
    Candace


    ---
  • 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