WordPress.org

Ready to get started?Download WordPress

Forums

WP-Members
[resolved] Export/Import form fields from WP Members (2 posts)

  1. Stefan83
    Member
    Posted 2 years ago #

    I'm installing WP Members on several different WP installations and want to copy the customised fields I've created for the registration form from one installation to all the others. Is this possible via the database?

    http://wordpress.org/extend/plugins/wp-members/

  2. Chad Butler
    Member
    Plugin Author

    Posted 2 years ago #

    THAT is a great question!

    Yes, you could do that by modifying your install file. The fields are loaded in an array called $wpmem_fields_options_arr. If you modify that accordingly, you can preload all of your custom fields in each installation without having to do it in the plugin's settings. (NOTE: if you have already installed it, you'll also need to set the install's $chk_force toggle to true. If the fields are already loaded, the default install will not attempt to overwrite them.)

    Each field is an array in the $wpmem_fields_options_arr. The array values are commented in the install. They are:

    • order (the order displayed, not really used)
    • label (the label displayed to the user)
    • optionname (the field's option name for meta)
    • type (field type, ie text, checkbox, etc.)
    • display (is this field displayed to the user, y/n)
    • required (is this a required field, y/n)
    • native (is this a WP native field, y/n - n for all custom fields!!)
    • checked value (if checkbox, what value is stored if checked)
    • checked by default (if checkbox, is it checked by default)

    If the field is not a checkbox, you do not have to include the checkbox array values (checked value & checked by default), they are optional.

    If you are adding a dropdown, you would leave out the checkbox array values and add an array of your dropdown values (there is an example of this commented in the install file).

    Hope that helps.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.