Membership Plugin

WordPress Membership Plugin

  • Home
  • Documentation
  • Addons
  • Support
    • Quick Setup
    • Documentation
    • Premium Addon Support
    • Paid Support
    • Support Forum
    • Support Forum Search
    • Forum Login
    • Forum Registration
  • Contact

Prefill data into registration form

Simple Membership Plugin › Forums › Simple Membership Plugin › Prefill data into registration form

  • This topic has 4 replies, 2 voices, and was last updated 8 years, 9 months ago by francescospina.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • August 21, 2017 at 10:42 am #11788
    francescospina
    Participant

    Hi, i need to pre fill data into registration form.

    I created this workflow:

    1. User insert name and email into my website in a form created with a marketing automation software
    2. I send him an email with a link to a page with simple membership form registration

    Into mail message at point 2 i send him an email with a link like this: http://www.mysite.it/community/registrati/?email=name%40example.com&first_name=XXXXXXXX

    where obviously name@example.com and XXXXXXXX are mail address and name of the user.

    Then i edited “simple-membership/views/add.php” file into plugin editor like this:

    <?php SimpleWpMembership::enqueue_validation_scripts(array('ajaxEmailCall' => array('extraData'=>'&action=swpm_validate_email&member_id='.filter_input(INPUT_GET, 'member_id')))); 
    
    $email = isset($_GET["email"]) ? $_GET["email"] : "";
    $first_name = isset($_GET["first_name"]) ? $_GET["first_name"] : "";
    ?>

    the problem is that when i upgrade the plugin all new file overwrite my code 🙁

    Is there a way to not lose my code or to add a code into plugin to prefill data?

    I don’t need it but it could be useful for someone to add a prefill code for last name or username too 🙂
    $email = isset($_GET[“email”]) ? $_GET[“email”] : “”;
    $first_name = isset($_GET[“first_name”]) ? $_GET[“first_name”] : “”;
    $last_name = isset($_GET[“last_name”]) ? $_GET[“last_name”] : “”;
    $username = isset($_GET[“username”]) ? $_GET[“username”] : “”;

    August 22, 2017 at 4:28 am #11799
    mbrsolution
    Moderator

    Hi, have you tried to use a child theme? You might be able to add those modified files in your child theme folders. Let me know if this works for you. I myself have not tried this yet.

    Kind regards

    August 22, 2017 at 9:25 am #11802
    francescospina
    Participant

    hi mbrsolution, thank you for your answer!

    I read about child theme and it is useful to edit theme css or functions not plugins 🙁

    August 22, 2017 at 9:40 am #11803
    mbrsolution
    Moderator

    Hi, yes that is correct. The function of child themes is to manage the themes customization. However in reality you can you do much more with child themes. I know of developers who have added to the child theme certain plugin files to avoid loosing the customize code when updating plugins. Like I mentioned above I have not tried this with our plugin. I just thought of sharing this possible solution with you.

    Kind regards

    August 22, 2017 at 9:48 am #11804
    francescospina
    Participant

    ok, I’ll try to create a child theme with plugin edited code and i’ll let you know 🙂

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.
Log In

Please read this message before using our plugin.

Search

Featured Addons and Extensions

  • Membership Form Builder Addon
  • Member Directory Listing Addon
  • WooCommerce Payment Integration
  • Member Data Exporter Addon

Documentation

  • Documentation Index Page

Copyright © 2026 | Simple Membership Plugin | Privacy Policy