Hello @stephenm
Assuming the field you want to edit is the fieldname1, please, insert a “HTML Content” field in the form and enter the following piece of code as its content:
<script>
fbuilderjQuery(document).one('showHideDepEvent', function(){
fbuilderjQuery('[id*="fieldname1_"]').attr('step', 0.01);
});
</script>
If you want to apply this modification to multiple number fields, you can assign to all of them a custom class name, for example: my-special-number
Note: The class names are assigned to the fields through their attributes: “Add CSS Layout Keywords”
and then, the piece of code to enter into the “HTML Content” field should be edited as follows:
<script>
fbuilderjQuery(document).one('showHideDepEvent', function(){
fbuilderjQuery('.my-special-number input').attr('step', 0.01);
});
</script>
and that’s all.
Best regards.
Thanks for the reply…..now i did try
$(‘#fieldname2_1’).attr(‘step’, 0.01);
but its not applying the step attribute to the input html
<input id=”fieldname2_1″ name=”fieldname2_1″ class=”field digits large valid” type=”number” value=”” placeholder=”g” autocomplete=”new-password” aria-invalid=”false”>
if you could advise?
Hello @stephenm
I’ve recommended you a code, but if you decide to use your own code and don’t follow my instructions, there is no way I can help you.
Please, insert the “HTML Content” field with the following piece of code:
<script>
fbuilderjQuery(document).one('showHideDepEvent', function(){
fbuilderjQuery('[id*="fieldname2_"]').attr('step', 0.01);
});
</script>
Or if you prefer to use the complete field’s name:
<script>
fbuilderjQuery(document).one('showHideDepEvent', function(){
fbuilderjQuery('#fieldname2_1').attr('step', 0.01);
});
</script>
Best regards.