• Resolved zimmerlis

    (@zimmerlis)


    I have 20 different buttons and I have one pupup divi contact form. The Subject of the Form, should reflect a value realted to the button that has been pressed.

    I have found https://divimode.com/knowledge-base/divi-areas-script-generator/ and I tried to use this script to automatically hide a certain field and show another <div id=”formheader”> tag with the read only information of the hidden field.

    <div id="formheader"></div>
    <script>
    (function() {
      DiviArea.addAction('show_area', function(area) {   
        if (! area.hasId('#PopupAnmeldungContactForm')) { return; }
        var dynamictext= 'Hello Worlds';
        var theField = area.get('input[name="et_pb_contact_fieldtitle_1"]');
        theField.val(kleingruppe);
        document.getElementById('et_pb_contact_fieldtitle_1').style.display = 'none';
    		document.getElementById('formheader').innerHTML = '<h3>' + dynamictext + '</h3>';
      });
    })();
    </script>
    

    I have not found out how I could make the dynamictext really something related to the button thjat has been pressed. So far the script is working ans the form is presented with a read only title/subject that is called Hello Worlds.

    I tried already to add on the button a link parameter like this #mypluginid?title=test and then used this script https://www.sitepoint.com/get-url-parameters-with-javascript/ to get the value from the url, but the popup does not work anymore then.

    Any other idea how that I can have the value of the button id that was pressed in the scirpt above?

    Regards

    René

    The page I need help with: [log in to see the link]

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

    (@divimode)

    Hi René,

    Apologies for the delay. Unfortunately this question is outside the scope of the level of support we can provide here in the forums. We support techs for DiviMode are not full programmers unfortunately ??

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.