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

Coding question – need to input an array of arrays on the form

Simple Membership Plugin › Forums › Simple Membership Plugin › Coding question – need to input an array of arrays on the form

Tagged: code, input, one-to-many arrays

  • This topic has 0 replies, 1 voice, and was last updated 10 years, 8 months ago by swisspenelope.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • August 12, 2015 at 12:15 pm #2648
    swisspenelope
    Participant

    Hi

    My question concerns swpm-front-registration, swpm-form, swpm-transfer and the Add and Edit views.

    (It is not urgent, although I have been going crazy for some days trying to figure out how to do it.)

    My membership form needs to support more than simple one-to-one key=>value pairs of input data. I have all the tables and other code set up, but the problem is the swpm-transfer class wants to initialize each set of fields for a form to:
    $some_fields = array
    (
    ‘One_field’ => ”,
    ‘Another_field’ => ”
    );
    whereas I need something like
    $some_fields = array
    (
    ‘One_field’ => {”,”,”,”, …}
    );

    The above situation corresponds to a set of checkboxes enabling several chosen activities per member.

    In swpm-front-registration, near the end of the regigstration_ui($level) function, after:

    if (!empty($swpm_registration_submit)) 
    {
           $member = $_POST;

    … when I print_r the contents of $member, I can see my selected checkboxes clearly, in the format:

    [lang_group] => Array
            (
                [0] => French Elementary
                [1] => Italian Beginners
                [2] => Japanese
            )

    but I can’t get your swpm framework to understand and work with them!

    Any ideas? Or else, if this is too complicated, is there a workaround that is not too dangerous? (None of my data is highly confidential – it’s all very mundane stuff.)

    Thanks, if and when you have time to answer this.
    SP

  • Author
    Posts
Viewing 1 post (of 1 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