Dynamic Hidden field?

Home Forums User Registration Dynamic Hidden field?

This topic contains 3 replies, has 2 voices, and was last updated by  Living Ashram 1 year ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #6315

    Living Ashram
    Participant

    Hi

    I need to be able to add some dynamic data to a registration form with a hidden field.

    I’d like to have a registration form setup to handle registration from various sources each via a unique URL.

    So I have a page URL structure like this https://site.com/register/{company}
    I have your mailchimp premium addon which I need to send this company to as a list field.

    The company value is made available in the page/template as a post argument via an add_rewite_rule.

    The registration page has the following shortcode
    [user_registration_form id="300"]

    I can do this via the shortcode editor or using a custom php page template perhaps calling the plugin directly.

    Thoughts?

    Many thanks
    Neil

    #6320

    sanjeev3
    Member

    Hey Neil,

    We don’t have automatic solution for this. However, you can use the registration form template, and add the hidden field similar to here. Also, you can use the provided filter and add the hidden input field.

    However, retreiving this info and sending this data to mailchimp list is not currently available, because inserting hidden field directly from backend option is not available and only the fields in the forms can be mapped into mailchimp list.

    We will look forward into introducing this too. Please stay updated!

    Regards,
    WPEverest Support

    #6322

    sanjeev3
    Member

    You can also drag an input field and add the default value and add custom class to hide this field. Screenshot: https://ibb.co/mTcpZf

    You need to add any class name and hide this field using additional CSS in the customizer. E.g. if you enter dynamic-field in custom class. Enter the following CSS in your customizer:

    .dynamic-field {
        display:none;
    }

    Hope this helps!

    #6323

    Living Ashram
    Participant

    Hi

    thanks for the response, looking forward to having hidden fields in there as an option.

    for the timebeing I’ve managed to work around it by adding a normal text field aznd then hiddin it with CSS and updating it with javascript

    e.g.

    [user_registration_form id="300"]
    
    <style>
    #company_field {
        visibility:hidden;
        position:absolute
    }
    </style>
    
    
    jQuery('input[data-id="company"]').val('[get_client_post_var]');
    
    
Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.