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

[Support request] Custom field using filter..

Simple Membership Plugin › Forums › Simple Membership Plugin › Custom field using filter..

Tagged: filter for custom field

  • This topic has 5 replies, 3 voices, and was last updated 8 years, 4 months ago by vinaysamant.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • January 16, 2018 at 6:21 pm #13001
    vinaysamant
    Participant

    Filter documentation says :
    swpm_before_registration_submit_button : This filter is triggered just before the registration form’s submit button is rendered. It can be used to add extra inputs, HTML code or text to the registration form of the plugin.

    I just want to add mobile number in registration form using filter. Dont want to use Form Builder module just for this one specific need. Can you kindly guide about this?

    January 16, 2018 at 10:25 pm #13005
    mbrsolution
    Moderator

    Hi, simply add the following code to your themes functions.php file. Make sure you replace the following line I have highlighted in bold with your own text. $output .= ‘This text will get shown just above the submit button.’.

    
    add_filter('swpm_before_registration_submit_button', 'my_custom_code');
    function my_custom_code($output) { 
        //Add any extra text or HTML code
        $output .= 'This text will get shown just above the submit button.'; 
        return $output;
    }

    Let me know if you need more help.

    Kind regards

    January 17, 2018 at 9:50 am #13016
    vinaysamant
    Participant

    hii…

    i know about text.
    The documentation says it allows “extra input” on the form. Is it possible to add just one field like mobile that will be captured in process of registration.

    **i dont want to use form builder module only for this one small requirement.

    January 17, 2018 at 10:05 pm #13019
    mbrsolution
    Moderator

    Hi, I understand your point of view. However at present the only way to achieve this is by the Form Builder addon.

    I have submitted a message to the developers to investigate further your request.

    Thank you

    January 18, 2018 at 4:41 am #13023
    admin
    Keymaster

    Its a little bit tricky as you also need to use the action hook to insert the data in the database table after the form is submitted. I have never handled this before so I don’t really have a ready-made solution for it unfortunately. You are free to modify the code as you need.

    January 19, 2018 at 3:05 am #13038
    vinaysamant
    Participant

    which action hook should be used to insert in data in database? or which function to be modified?

  • Author
    Posts
Viewing 6 posts - 1 through 6 (of 6 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