• Resolved badmax69

    (@badmax69)


    I’ve tried a lot and can’t come up with a solution. I have an input field type number with the ID=”Test” in an HTML form.
    I would like to have the corresponding Javascript external and not in the HTML.

    Using Calculated Field and getEelementById(‘Test’).value I get only the given value, but not an updated one. Therefore I have to trigger continuously. But despite different approaches I get no result.

    Because the input is to be multiplied afterwards with the value of another field and to be output again at other place.

    What would be the simplest solution here?

Viewing 1 replies (of 1 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @badmax69

    If you want to use the tools in the plugin, my recommendation would be insert a “Hidden” field in the form (I’ll call it fieldname1), and then, populate this field with the value of your “text” field, including a piece of code in a “HTML Content” field:

    
    <script>
    jQuery(document).on('change', '#test', function(){
    jQuery('[id*="fieldname1_"]').val(this.value).change();
    });
    </script>
    

    and then, you simply should use the hidden field in the equations associated to the calculated fields.

    I’m sorry, but if you need help implementing your project with your own business logic, you should request a custom coding service through my private website:

    https://cff.dwbooster.com/customization

    Best regards.

Viewing 1 replies (of 1 total)

The topic ‘GetElementById onchange’ is closed to new replies.