Using blank option for drop-down action event: Regular Expression Needed
Last Post 07-16-2007 01:02 PM by Chad Nash. 1 Replies.
AddThis - Bookmarking and Sharing Button
Author Messages
John TerpeningUser is Offline
going with the flow
going with the flow
Posts:44
Avatar

--
07-16-2007 02:17 AM

    I created a drop-down to trigger an action event, which works fine, except when it uses a default. For example, this drop-down has 3 options: hotel, cruise, flights. If hotel is selected, it should trigger a set of hidden questions; likewise for the other options.

    Given that it uses a default (in this case hotels or any other I would set), the user has to select another, then go back and select hotels to trigger the event.

    I assume the work around would be to have a null or a -select option- option. If this is the case, however, I would need to validate this required field and further assume I need a regular expression that says the field cannot equal 'blank' or cannot equal "-select option-.

    Knowing nothing about nothing, could someone help me with this one?

     

    One question I had: I have a field for currency; would using $ as the default screw up any ability to query the data? For example, I used '$' as the default, and I hope users would enter $50, for example.  Would $50 screw up the integrity of the DB or limit a query/sort/filter? 

     

     

    Chad NashUser is Offline
    Posts:5260
    Avatar

    --
    07-16-2007 01:02 PM
    John,

    As far as the dropdownlist. Yes you would either need to make sure the fields that show up originally match with the default (i.e. Hotel) or, yes you can implement the -Select Option-. One thing to note, as long as you have server side validation turned on you can make combo box fields required. If the field is set to required (and server side validation is turned on) the very first option within the dropdownlist will cause the validation to throw an error and the validation message will appear that the field is required.

    I don't imagine having the user enter $50 would in any way hurt the integrity of the data etc... You might consider searching around for regular expressions though so that each user is forced to enter a $.

    -Chad


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