• Resolved hennesseystealth

    (@hennesseystealth)


    I have a text field that is a currency name. I would like to use that currency name in other field labels. As an example, a wage field label would like to be Engineer Wage (currency name/hour). I played around with adding things like %fieldname14% etc. to the field labels, but nothing seems to work.

    Thoughts?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter hennesseystealth

    (@hennesseystealth)

    Is there any way to have a text input be used as a label for another input cell? This could be in the field label or in a new cell that is to the right of the input cell of interest.

    Plugin Author codepeople

    (@codepeople)

    Hello @hennesseystealth

    For some reason I had not received the notification of your previous question.

    Yes, of course that’s possible, insert as part of field’s label a span tag where will be displayed the value of the currencey field, similar to:

    Engineer Wage (<span class="value-here"></span>/hour)

    Now, assuming the currency field is the fieldname14, insert a “HTML Content” field in the form, with the following piece of code as its content:

    
    <script>
    jQuery(document).on('change', '[id*="fieldname14_"]', function(){
    jQuery('.value-here').html(this.value);
    });
    </script>
    

    and that’s all.
    Best regards.

    Thread Starter hennesseystealth

    (@hennesseystealth)

    Works perfect. thanks.

    Plugin Author codepeople

    (@codepeople)

    Hello @hennesseystealth

    It has been a pleasure.

    Best regards.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Using a text input as part of a field label’ is closed to new replies.