Share ideas, ask questions, and get feedback about developing for ProcessMaker
Forum rules: Please post new questions under "Developing processes & programming" for ProcessMaker 2 or 3.
By nikolakis
#62104
I would like to add a dropdown menu, which will include a null value. In particular, I would like to enable the required field to the dropdown menu. So, the user should not be able to proceed submitting the form, if this null value is selected. Is there a way to do it, perhaps with a jsp code?
I am using 2.0.43 edition. Thank you in advance.
User avatar
By ronrich
#62124
Hello nikolakis,

you can use the "Conditions Editor" Tab for your dynaform
and set the action to disable your submit button when the users selects the NULL value

please tell me if you need more help with this

Good Luck!
By nikolakis
#62224
Thank you very much for your instant response.
I am trying to do it under your instructions, but I face some problems. My situation is the following:
I have a check box (Application) and afterwards a Dropdown menu (Application Settings) that I want it to be visible only if the checkbox is marked as true.
From the condition editor I have chosen hide only Application Settings when @#Application==false.
Then I want to hide only the Submit Button when @#Application Settings==null(null value mentioned in the previous post)
I have succeeded it by using hide only Submit when @#Application Setting==null && @#Application==true.

Then, the problem is that when the dropdown Menu (Application Settings) changes value (!=null) the Submit Button won't show up again.
Have you any ideas how it will work?

To sum up, my current entries in the conditions Editor are the following:
# Function Fields Condition Events Event Owner Enabled
1 Hide Only Application Settings @#Application==false onload,onchange Application yes
3 ShowAll @#Application Settings!=null onchange Application Settings yes
2 Hide Only Submit @#Application==true && @#Application Settings==null onload,onchange Application, Application Settings yes
User avatar
By ronrich
#62241
Hello nikolakis,

you only have to create another condition, but this to show your fields or button. just the same way you did it to hide the button

Good luck!
By nikolakis
#63986
I have still not succeeded to apply it, but let me post another question, which might help me to conclude.
How does the required field works on a dropdown menu?
How does the form recognizes, that there is no value selected?
Correct me if I am wrong, but the dropdown menu always has a preselected value. It is by default the first value in the options.

In conclusion, the required field check, always succeeds in a case o a dropdown menu.

(I am now using Process Maker 2.5.0)
By dlynch
#783814
I assume you found an answer based on age of question, however, here how i enabled the dropdown required option:
{
"type": "dropdown",
"variable": "REQ_CCSTATUS",
"dataType": "string",
"id": "REQ_CCSTATUS",
"name": "REQ_CCSTATUS",
"label": "Status",
"defaultValue": "",
"hint": "",
"required": true,
"dependentFields": [],
"mode": "parent",
"dbConnection": "workflow",
"dbConnectionLabel": "PM Database",
"sql": "",
"options": [
{
"value": "",
"label": "--Select--"

},
{
"value": "1",
"label": "Scheduled"
},
{
"value": "3",
"label": "Not required"
}
],
"var_uid": "46044921855ad08cf4ff147057005316",
"var_name": "REQ_CCSTATUS",
"colSpan": 12
}
]

your 1st value in the options list is blank with a Label of "--Select--" , then populate the rest of your drop down with your fields or a SQL table. If the user leaves the drop down at "--select--" they will get an error message stating the field is required. (this is version 3.0, but also works in 2.8)

Fildena double 200 mg capacity to move the relaxin[…]

Wat is Fildena Double 200?

Fildena double 200 mg capacity to move the relaxin[…]

💥 Join the Exclusive Trading Community and Experie[…]

Briefly introduce the topic and provide context. S[…]