• Resolved montesound

    (@montesound)


    Thanks for designing such a great little plugin. Is it possible to prefill the name and email fields like you can do with the subject field?

    We would like to allow our users to be able to anonymously submit feedback from our service. Prefilling the name and email fields with a specific name and feedback email address would make this possible.

    Best regards

    https://ww.wp.xz.cn/plugins/zendesk-request-form/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author pipdig

    (@pipdig)

    Hi montesound, glad you like it!

    I’ve added this to version 2.2.3 for you now. So you can use the following:

    [zendesk_request_form name="Prefilled Name" email="[email protected]"]

    If the fields are prefilled, then you can then hide them with some CSS:

    <style>
    #zendesk_field_zen_name, #zendesk_field_zen_email {
    display: none;
    }
    </style>

    You may also wish to disable the fields so people cannot edit them:

    <script>
    jQuery(document).ready(function($) {
    $("#zendesk_field_zen_name input, #zendesk_field_zen_email input").prop("disabled", true);
    });
    </script>

    Please note, the prefill of the name and email will only work for users who are not logged on. If the user is logged in, then the account data will be used instead of the prefilled attributes.

    Thread Starter montesound

    (@montesound)

    Hi pipdig,

    That is working well. Do you have any thoughts on how I could collect it anonymously if they happen to be logged in?

    Thanks

    Plugin Author pipdig

    (@pipdig)

    I’ve just created a new option so that you can disable that. If you update to version 2.2.4 you can disable user data from being used like this:

    [zendesk_request_form users="no" name="Prefilled Name" email="[email protected]"]

    Hopefully that helps 🙂

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

The topic ‘Prefill Name and Email field’ is closed to new replies.