Skip to main content
Known Participant
Jul 6, 2017 3:32 PM UTC
Question

Force selection of drop down

Is there a way to force user to make a selection from a drop down before allowing them to move on to the next field?  Like it lights up red if selection not made?  I know in TurboTax, it won't let me do anything if I don't make a choice.  I want the field box to turn red and then an asterisk to come up telling user to make a selection.

I know how to do this by adding an app alert if the field is null but wanted to introduce a visual affect as well.

Thx.

Sue

This topic is closed to new replies. Start a new post to keep the conversation going.

7 replies

Joel Geraci
Community Expert
Community Expert
Jul 6, 2017 10:21 PM UTC

Trying to clarify...

If the user enters the dropdown field you want them to...

A) not be able to exit until they make a selection or

B) you want to allow them to exit but change the appearance of the dropdown field to indicate a value is required.

If A, you don't need B.

If B, you don't actually want A.

Translate
suemo22Author
Known Participant
Jul 7, 2017 3:15 PM UTC

Hi,

I guess A is the most simple so A.

I tried the following after the user clicks the okay button but nothing happens:

if ("ok" == cRtn)

{

      if (global.docNumAction.strExmp == null) //Ensure the document type is selected

      {

      app.alert (("Please select document type"))

      }

}

Translate
suemo22Author
Known Participant
Jul 7, 2017 6:02 PM UTC

I even tried adding .value but it seems it won't recognize a null value.  What am I doing wrong?  I want it to generate an app alert when there is no value in the strExmp field which starts of as "" and gets populated by drop down (if selected).  I want it notice thatno value was chosen from the drop down list and to alert the user.

   

if ("ok" == cRtn)

{

      if (global.docNumAction.strExmp.value == null) //Ensure the document type is selected

      {

      app.alert (("Please select document type. This field cannot be blank"))

      }

}

Translate