Skip to:
Content
Pages
Categories
Search
Top
Bottom

Savings values at the create_screen stage of group plugin


  • revolutionfrance
    Participant

    @revolutionfrance

    Hello, I am having trouble saving the value of my fields for a plugin that I am creating. (took away all the php tags to post here)

    function create_screen() {
    if ( !bp_is_group_creation_step( $this->slug ) )
    return false;

    The HTML for my creation step goes here.


    groupaddress ) ?>” />


    groupcity ) ?>” />


    groupcountry ) ?>” />

    wp_nonce_field( ‘groups_create_save_’ . $this->slug );
    }

    function create_screen_save() {
    global $bp;

    check_admin_referer( ‘groups_create_save_’ . $this->slug );

    $groupaddress = $_POST;
    $groupcity = $_POST;
    $groupcountry = $_POST;

    /* Save any details submitted here */
    groups_update_groupmeta( $bp->groups->current_group->id, ‘group-address’, $groupaddress );
    groups_update_groupmeta( $bp->groups->current_group->id, ‘group-city’, $groupcity );
    groups_update_groupmeta( $bp->groups->current_group->id, ‘group-country’, $groupcountry );
    }

  • The topic ‘Savings values at the create_screen stage of group plugin’ is closed to new replies.
Skip to toolbar