Store values at create_screen_save
-
Hello! I am having problems storing and retrieving the value of my field at a custom group creation stage. Here is my code,
anyone that could help? Thx a lot!function create_screen() {
if ( !bp_is_group_creation_step( $this->slug ) )
return false;
?>The HTML for my creation step goes here.
<input type="text" name="group-address" id="group-address" value="groupaddress ) ?>” />
<input type="text" name="group-city" id="group-city" value="groupcity ) ?>” />
<input type="text" name="group-country" id="group-country" value="groupcountry ) ?>” /><?php
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 ‘Store values at create_screen_save’ is closed to new replies.