Forum Replies Created

Viewing 1 replies (of 1 total)
  • This does not appear to work.

    Deep within /ninja-forms/includes/Templates/fields-hidden.html, the template does not allow for the “name” attribute (or “id”) of a hidden field to be anything but nf-field-{{{ data.id }}}

    Full code from fields-hidden.html:

    
    <script id="tmpl-nf-field-hidden" type="text/template">
        <input type="hidden" id="nf-field-{{{ data.id }}}" name="nf-field-{{{ data.id }}}" class="{{{ data.renderClasses() }}} nf-element" type="text" value="{{{ data.value }}}" {{{ data.renderPlaceholder() }}}>
    </script>
    

    Furthermore, it would be better if within /ninja-forms/includes/Fields/Hidden.php, NF_Fields_Hidden had ‘custom_name_attribute’ in its settings so that something like…

    
    "{{ data.custom_name_attribute || 'nf-field-' + data.id }}"
    

    …would be possible, as is done in /ninja-forms/includes/Templates/fields-textbox.html

Viewing 1 replies (of 1 total)