• Resolved bartoszc

    (@bartoszc)


    I’m using form maker on my wordpress site and I want to add some value to form maker field. I need to add the php POST function to the value.
    How to do it, is there any way? I tried to do it in the custom html field but it didnt work. I need to make it known from which post the form was sent.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Zhanna Khachatryan

    (@zhannak)

    Hi @bartoszc,

    Thanks for your inquiry.

    If the purpose is just to know from which page/post the form is submitted then we have an option for that in email options > custom text to Administrator section, we have Page URL placeholder, if you insert it in the email you’ll see from which page the form was submitted.

    I have made a screen video for you, please check it https://nimb.ws/edLKkH.

    Thread Starter bartoszc

    (@bartoszc)

    Hi

    Thanks for your answer,
    it will be very useful

    But I need to know if is it possible to make it known in the Submissions/database from which post/page the form came from?
    I tried to make Javascript but it didn’t work.

    // Occurs before the form is loaded
    function before_load() {
    function getURL(url) {
    url = window.location.href;
    }
    jQuery(“#wdform_34_element4”).val(“#url”);
    }

    And i made form element “Hidden input”, but I was unable to get the values ​​into the database. Whether the script was badly done or do I have to call a function in “Edit field”.

    I am asking for help in this matter.

    Dear @bartoszc,

    Sorry for the belated response.

    Please try the following:

    1. Add hidden input to the form
    2. Add the following code to the before_submit() function in custom js of the form
    jQuery("input[name='your_hidden_field_name']").val(window.location.href);

    Let us know how it works.

    Sincerely,

    Thread Starter bartoszc

    (@bartoszc)

    Thank you for your answer,

    Its working perfecly.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘How to add php code to field value in form maker’ is closed to new replies.