I am currently developing a WordPress website for a university using the Forminator plugin. I have a specific requirement related to extracting the value (not the label) from a selected “select” option, and I would greatly appreciate your assistance in resolving this matter.
Here are the details of the issue I am facing:
- Extracting Only the Value from the Selected Option: I am utilizing the “select” field within Forminator to allow users to choose from various options. However, my specific requirement is to retrieve a tag with only the value associated with the selected option, not the label.
For example, in the code:
<option value="1">Discipline A</option>
<option value="2">Discipline B</option>
<option value="3">Discipline C</option>
When a user selects “Discipline B,” I need to capture the value “2” exclusively, disregarding the label “Discipline B.”
Considering this requirement, I kindly request your guidance on achieving the following:
- Suggesting a method or tag that enables me to extract only the value associated with the selected “select” option, without including the label.