form select input element

Confluence User - 03 Feb, 2025

I dont want the random digits followed by my given id. which makes it difficult to attach any javascripts.

eg.
<select id="lead_type_10672147061629756511111141367357" name="lead_type">
                <option value="" grouping="">Select From The Below Field</option>
</select>


instead i want only id="lead_type" or whatever i give as id.

forms

1


03 Feb, 2025
confluenceUser
confluenceUser

Hi Mahe, You can use the Joget Javascript API to write your scripts. 

Please Refer: Javascript API


Additionally you can select your Select boxes as show below:



// Select using name attribute
$("select[name='lead_type']").on("change", function() {
const selectedValue = $(this).val();// your logic goes here
});



Hope this helps!


RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print