Need to pull up a fields name not value and include it into a HTML header.

Home Forums Quform WordPress Need to pull up a fields name not value and include it into a HTML header.

This topic is: resolved
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #33537
    GOMLP
    Participant

    Hi Ally,

    Happy Tuesday and I hope all is well. You’ve been of great assistance in helping with pulling field values to incorporate in a customized HTML header and once again I have another issue that I hope you can shine some light on.

    This may be complicated to explain but I will give it a try. I have included two screenshots of my form to assist

    Screenshot – Form Step2:

    On this form you will see four (4) select menus “Preferred Units” (14_72), “Label Shape” (14_73) and “Stock or Custom Option” (14_90). All three of these fields contain their selection and values set under the interface attributes under the Basic tab.

    The forth menu “Stock Label Sizes” (14_91) is set dynamically and changes through the usage of JavaScript code depending on the “Preferred Units” and “Label Shape”. This field also has a Conditional Logic to show or hide depending if the customer selects “Stock Size” (show) or “Custom Size” (Hide). I have the code working good to pull the different sizes based on the “units of measurements” and the “Shape selected”.

    When the user selects a “Stock Label Shape” I want to pull their selection, NAME not VALUE from my code to display it in the header of the Form’s Step3.

    Below is a snippet of the code used to generate the different available measurements for “Stock Label Sizes” (14_91):

    jQuery(function ($) {
    var $select1 = $(‘.quform-field-14_72’),
    $select2 = $(‘.quform-field-14_73’),
    $select3 = $(‘.quform-field-14_91’);

    var data = {
    ‘Metric:Square’: [
    { text: ‘9.525mm X 9.525mm — Radius: 1.6002mm’, value: ‘SM1001’ },
    { text: ‘16.764mm X 16.764mm — Radius: 3.556mm’, value: ‘SM1002’ },
    { text: ‘19.99996mm X 19.99996mm — Radius: 0.79375mm’, value: ‘SM1003’ },
    { text: ‘31.75mm X 31.75mm — Radius: 3.175mm’, value: ‘SM1004’ },
    { text: ‘38.1mm X 38.1mm — Radius: 0.79375mm’, value: ‘SM1005’ } ………….. cont…

    I am declaring the field “Stock Label Sizes” (14_91) in the Custom JavaScript with:

    jQuery(function ($) {
    $(‘.quform-field-14_91’).blur(function () {
    $(‘.stocksize-value’).text($(this).val());
    });
    });

    In my HTML header on Step3 I am using the code:

    <span class=”stocksize-value”></span>

    However it isn’t pulling the information and ideally I want it to pull the text with the dimensions and not the value which is our internal code.

    Any suggestions would be great.

    Attachments:
    You must be logged in to view attached files.
    #33540
    GOMLP
    Participant

    Ally,

    I just noticed this on the forums (see attached screenshot)…. Would and could I achieve this if I did some reverse engineering with my “Stock Label Sizes” select menu with a hidden field and then called the hidden field to display the selected dimensions in an HTML header? or is there a simpler way?

    Attachments:
    You must be logged in to view attached files.
    #33543
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #33547
    GOMLP
    Participant

    This worked perfectly, once again Ally I thank you very much.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Be inspired. © 2024 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy