I can replace search text with search icon at chrome developer tool element by replacing
<input type="submit" value="search">
with this:
<button type="submit" id="searchsubmit" />
<span class="icon"><i class="fa fa-search"></i></>
</button>
this is theme searchform.php
<?php
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
?><form role="search" method="get" class="pojo-form form-search" action="<?php echo home_url( '/' ); ?>">
<label for="s">
<span class="sr-only"><?php _e( 'Search for:', 'pojo' ); ?></span>
</label>
<input type="search" title="<?php _e( 'Search', 'pojo' ); ?>" name="s" value="<?php echo ( isset( $_GET['s'] ) ) ? $_GET['s'] : ''; ?>" placeholder="<?php _e( 'Search...', 'pojo' ); ?>" class="field search-field">
<button value="<?php _e( 'Search', 'pojo' ); ?>" class="search-submit button" type="submit"><?php _e( 'Search', 'pojo' ); ?></button>
</form>
My question is
How can I modify searchform.php in order to to get the search icon
https://krush.co.il/
<button class="search-submit button" type="submit"><span class="icon"><i class="fa fa-search"></i></span></button>
You don't need to have both the value of the button and the inner html of the button tag. You just want to change the search text with your icon html.
Related
I've moved the coupon field in the cart from the items table to the cart totals table.
Everything works fine so far. But after adding a code, the form doesn't show any error or success messages.
I tired to figure out why that's the case but couldn't find anything?
Is there some javascript involved? Do I miss some classes?
Here's my current code:
<?php
add_action( 'woocommerce_cart_totals_before_shipping', 'display_coupon_form_below_proceed_checkout', 100 );
function display_coupon_form_below_proceed_checkout() { ?>
<?php if ( wc_coupons_enabled() ) { ?>
<tr class="cart-discount-add">
<th colspan="2">
<a data-toggle="collapse" href="#collapseCartCoupon" role="button" aria-expanded="false" aria-controls="collapseCartCoupon">Add coupon code</a>
</th>
</tr>
<tr class="cart-discount-form">
<td colspan="2">
<form class="woocommerce-coupon-form" action="<?php echo esc_url( wc_get_cart_url() ); ?>" method="post">
<div class="coupon collapse" id="collapseCartCoupon">
<div class="input-group">
<input type="text" name="coupon_code" class="form-control input-text" id="coupon_code" value="" placeholder="<?php esc_attr_e( 'Coupon code', 'woocommerce' ); ?>" />
<div class="input-group-append">
<button type="submit" class="button" name="apply_coupon" value="<?php esc_attr_e( 'Apply coupon', 'woocommerce' ); ?>"><?php esc_attr_e( 'Apply coupon', 'woocommerce' ); ?></button>
</div>
</div>
</div>
</form>
</td>
</tr>
<?php } ?>
<?php } ?>
I have my website built upon wordpress and woocommerce. At the login page of woocommerce there is two radio buttons to select "I am a customer" and another "I am a vendor". I want to remove those two radio buttons with texts too. https://www.osdoc.in/my-account/ : This is the link , under the register section and just below the "login with social ids" icons.
In your child theme, create a folder as "dokan" and inside it create a folder with the name "global".
In "global" folder, create a file as seller-registration-form.php to override default template which you can find from wp-content\plugins\dokan-lite\templates\global
Put the following code in this file. There is no option to ask user type and it will create a seller only.
<?php
/**
* Dokan Seller registration form
*
* #since 2.4
*
* #package dokan
*/
$role = 'seller';
$role_style = '';
?>
<div class="show_if_seller" style="<?php echo esc_attr( $role_style ); ?>">
<div class="split-row form-row-wide">
<p class="form-row form-group">
<label for="first-name"><?php esc_html_e( 'First Name', 'dokan-lite' ); ?> <span class="required">*</span></label>
<input type="text" class="input-text form-control" name="fname" id="first-name" value="<?php if ( ! empty( $postdata['fname'] ) ) echo esc_attr($postdata['fname']); ?>" required="required" />
</p>
<p class="form-row form-group">
<label for="last-name"><?php esc_html_e( 'Last Name', 'dokan-lite' ); ?> <span class="required">*</span></label>
<input type="text" class="input-text form-control" name="lname" id="last-name" value="<?php if ( ! empty( $postdata['lname'] ) ) echo esc_attr($postdata['lname']); ?>" required="required" />
</p>
</div>
<p class="form-row form-group form-row-wide">
<label for="company-name"><?php esc_html_e( 'Shop Name', 'dokan-lite' ); ?> <span class="required">*</span></label>
<input type="text" class="input-text form-control" name="shopname" id="company-name" value="<?php if ( ! empty( $postdata['shopname'] ) ) echo esc_attr($postdata['shopname']); ?>" required="required" />
</p>
<p class="form-row form-group form-row-wide">
<label for="seller-url" class="pull-left"><?php esc_html_e( 'Shop URL', 'dokan-lite' ); ?> <span class="required">*</span></label>
<strong id="url-alart-mgs" class="pull-right"></strong>
<input type="text" class="input-text form-control" name="shopurl" id="seller-url" value="<?php if ( ! empty( $postdata['shopurl'] ) ) echo esc_attr($postdata['shopurl']); ?>" required="required" />
<small><?php echo esc_url( home_url() . '/' . dokan_get_option( 'custom_store_url', 'dokan_general', 'store' ) ); ?>/<strong id="url-alart"></strong></small>
</p>
<p class="form-row form-group form-row-wide">
<label for="shop-phone"><?php esc_html_e( 'Phone Number', 'dokan-lite' ); ?><span class="required">*</span></label>
<input type="text" class="input-text form-control" name="phone" id="shop-phone" value="<?php if ( ! empty( $postdata['phone'] ) ) echo esc_attr($postdata['phone']); ?>" required="required" />
</p>
<?php
$show_terms_condition = dokan_get_option( 'enable_tc_on_reg', 'dokan_general' );
$terms_condition_url = dokan_get_terms_condition_url();
if ( 'on' === $show_terms_condition && $terms_condition_url ) { ?>
<p class="form-row form-group form-row-wide">
<input class="tc_check_box" type="checkbox" id="tc_agree" name="tc_agree" required="required">
<label style="display: inline" for="tc_agree"><?php echo wp_kses_post( sprintf( __( 'I have read and agree to the <a target="_blank" href="%s">Terms & Conditions</a>.', 'dokan-lite' ), esc_url( $terms_condition_url ) ) ); ?></label>
</p>
<?php }
do_action( 'dokan_seller_registration_field_after' );
?>
</div>
<?php do_action( 'dokan_reg_form_field' ); ?>
<p class="form-row form-group user-role" style="display:none;">
<label class="radio">
<input type="radio" name="role" value="customer"<?php checked( $role, 'customer' ); ?>>
<?php esc_html_e( 'I am a customer', 'dokan-lite' ); ?>
</label>
<label class="radio">
<input type="radio" name="role" value="seller"<?php checked( $role, 'seller' ); ?> >
<?php esc_html_e( 'I am a vendor', 'dokan-lite' ); ?>
</label>
<?php do_action( 'dokan_registration_form_role', $role ); ?>
</p>
<script>
jQuery(window).on('load', function() {
jQuery("#tc_agree").removeAttr("disabled");
jQuery("#first-name").removeAttr("disabled");
jQuery("#last-name").removeAttr("disabled");
jQuery("#shop-phone").removeAttr("disabled");
jQuery("#company-name").removeAttr("disabled");
jQuery("#seller-url").removeAttr("disabled");
});
</script>
In your child theme, you'll need to create a folder with the name dokan and inside it you'll add another folder with the name global. Inside global you'll create a file to override the default registration template seller-registration-form.php, and add the following inside it, save and view changes:
<?php
/**
* Dokan Seller registration form
*
* #since 2.4
*
* #package dokan
*/
?>
<div class="show_if_seller" style="<?php echo esc_attr( $role_style ); ?>">
<div class="split-row form-row-wide">
<p class="form-row form-group">
<label for="first-name"><?php esc_html_e( 'First Name', 'dokan-lite' ); ?> <span class="required">*</span></label>
<input type="text" class="input-text form-control" name="fname" id="first-name" value="<?php if ( ! empty( $postdata['fname'] ) ) echo esc_attr($postdata['fname']); ?>" required="required" />
</p>
<p class="form-row form-group">
<label for="last-name"><?php esc_html_e( 'Last Name', 'dokan-lite' ); ?> <span class="required">*</span></label>
<input type="text" class="input-text form-control" name="lname" id="last-name" value="<?php if ( ! empty( $postdata['lname'] ) ) echo esc_attr($postdata['lname']); ?>" required="required" />
</p>
</div>
<p class="form-row form-group form-row-wide">
<label for="company-name"><?php esc_html_e( 'Shop Name', 'dokan-lite' ); ?> <span class="required">*</span></label>
<input type="text" class="input-text form-control" name="shopname" id="company-name" value="<?php if ( ! empty( $postdata['shopname'] ) ) echo esc_attr($postdata['shopname']); ?>" required="required" />
</p>
<p class="form-row form-group form-row-wide">
<label for="seller-url" class="pull-left"><?php esc_html_e( 'Shop URL', 'dokan-lite' ); ?> <span class="required">*</span></label>
<strong id="url-alart-mgs" class="pull-right"></strong>
<input type="text" class="input-text form-control" name="shopurl" id="seller-url" value="<?php if ( ! empty( $postdata['shopurl'] ) ) echo esc_attr($postdata['shopurl']); ?>" required="required" />
<small><?php echo esc_url( home_url() . '/' . dokan_get_option( 'custom_store_url', 'dokan_general', 'store' ) ); ?>/<strong id="url-alart"></strong></small>
</p>
<p class="form-row form-group form-row-wide">
<label for="shop-phone"><?php esc_html_e( 'Phone Number', 'dokan-lite' ); ?><span class="required">*</span></label>
<input type="text" class="input-text form-control" name="phone" id="shop-phone" value="<?php if ( ! empty( $postdata['phone'] ) ) echo esc_attr($postdata['phone']); ?>" required="required" />
</p>
<?php
$show_terms_condition = dokan_get_option( 'enable_tc_on_reg', 'dokan_general' );
$terms_condition_url = dokan_get_terms_condition_url();
if ( 'on' === $show_terms_condition && $terms_condition_url ) { ?>
<p class="form-row form-group form-row-wide">
<input class="tc_check_box" type="checkbox" id="tc_agree" name="tc_agree" required="required">
<label style="display: inline" for="tc_agree"><?php echo sprintf( __( 'I have read and agree to the <a target="_blank" href="%s">Terms & Conditions</a>.', 'dokan-lite' ), esc_url( $terms_condition_url ) ); ?></label>
</p>
<?php }
do_action( 'dokan_seller_registration_field_after' );
?>
</div>
<?php do_action( 'dokan_reg_form_field' ); ?>
Source of the code above is the original template
On the backend, I add a coupon code. If I click the submit button the coupon code will apply. How do I apply my coupon code pressing the enter key in mobile and desktop? Some users will press enter instead using the mouse to click button. Default woocommerce doesn't have that feature. how do I make it work? Thanks
$("#inputbox").keypress(function(event) {
if (event.which == 13) {
event.preventDefault();
$(this).closest('input[type=submit]').click();
}
});
<form id="testt" action="<?php echo esc_url( WC()->cart->get_cart_url() ); ?>" method="post">
<?php do_action( 'woocommerce_before_cart_table' ); ?>
<div class="coupon">
<?php if ( WC()->cart->coupons_enabled() ) { ?>
<span for="coupon_code"><?php _e( 'Coupon code:', 'woocommerce' ); ?></span>
<div class="input-container">
<div class="form-row">
<input id="inputbox" class="input" type="text" name="coupon_code" value="" placeholder="<?php esc_attr_e( 'bebrave', 'woocommerce' ); ?>" />
</div>
<input type="submit" class="ds btn" name="apply_coupon" value="<?php esc_attr_e( 'Apply Coupon', 'woocommerce' ); ?>" />
<?php do_action( 'woocommerce_cart_coupon' ); ?>
</div>
<?php } ?>
<?php wc_print_notices(); ?>
<?php do_action( 'woocommerce_cart_actions' ); ?>
<?php wp_nonce_field( 'woocommerce-cart' ); ?>
</div>
<?php do_action( 'woocommerce_after_cart_contents' ); ?>
<?php do_action( 'woocommerce_after_cart_table' ); ?>
</form>
// how will i redirect this page after successful submission of the form it takes the user to homepage?? this is the website : http://shambas.co.ke/shambaz/submit-property/
<?php
if($submitted_successfully){
$submit_message = get_option('theme_submit_message');
alert( __('Success:','framework'), $submit_message );
}
elseif($updated_successfully){
alert( __('Success:','framework'),__('Property updated successfully!','framework') );
}
else{
/* if passed parameter is properly set to edit property */
if(isset($_GET['edit_property']) && !empty($_GET['edit_property'])){
$edit_property_id = intval(trim($_GET['edit_property']));
$target_property = get_post($edit_property_id);
/* check if passed id is a proper property post */
if( !empty( $target_property ) && ( $target_property->post_type == 'property' ) ){
// Check Author
global $current_user;
get_currentuserinfo();
/* check if current logged in user is the author of property */
if( $target_property->post_author == $current_user->ID ){
$post_meta_data = get_post_custom( $target_property->ID );
?>
<form id="submit-property-form" class="submit-form" enctype="multipart/form-data" method="post">
<div class="row-fluid">
<div class="span6">
<div class="form-option">
<label for="title"><?php _e('Property Title','framework'); ?></label>
<input id="title" name="title" type="text" class="required" value="<?php echo $target_property->post_title; ?>" title="<?php _e( '* Please provide property title!', 'framework'); ?>" autofocus required/>
</div>
<div class="form-option">
<label for="description"><?php _e('Property Description','framework'); ?></label>
<textarea name="description" id="description" cols="30" rows="5"><?php echo $target_property->post_content; ?></textarea>
</div>
<div class="form-options-container clearfix">
<div class="form-option ">
<label for="city"><?php _e('Location', 'framework'); ?></label>
<span class="selectwrap">
<select name="city" id="city" class="search-select">
<?php edit_form_hierarchichal_options( $target_property->ID, 'property-city'); ?>
</select>
</span>
</div>
<div class="form-option right">
<label for="status"><?php _e('Status', 'framework'); ?></label>
<span class="selectwrap">
<select name="status" id="status" class="search-select">
<?php edit_form_taxonomy_options( $target_property->ID, 'property-status'); ?>
</select>
</span>
</div>
<div class="form-option">
<label for="price"><?php _e('Price','framework'); ?></label>
<input id="price" name="price" type="text" value="<?php if( isset($post_meta_data['REAL_HOMES_property_price']) ){ echo $post_meta_data['REAL_HOMES_property_price'][0]; } ?>" title="<?php _e( '* Please provide the value in only digits!', 'framework'); ?>" />
</div>
<div class="form-option right">
<label for="size"><?php _e('Property Size','framework'); ?></label>
<input id="size" name="text" type="text" value="<?php if( isset($post_meta_data['REAL_HOMES_property_size']) ){ echo $post_meta_data['REAL_HOMES_property_size'][0]; } ?>" title="<?php _e( '* Please provide the value in only digits!', 'framework'); ?>" />
</div>
</div>
<div class="form-option">
<label for="featured"><?php _e('Mark this Property as Featured','framework'); ?></label>
<input id="featured" name="featured" type="checkbox" <?php if( isset($post_meta_data['REAL_HOMES_featured']) && $post_meta_data['REAL_HOMES_featured'][0] == 1 ){ echo 'checked';} ?>/>
</div>
</div>
<div class="span6">
<div class="form-option">
<label for="address"><?php _e('Address', 'framework'); ?></label>
<input type="text" class="required" name="address" id="address" value="<?php if( isset( $post_meta_data['REAL_HOMES_property_address'] ) ){ echo $post_meta_data['REAL_HOMES_property_address'][0]; } ?>" title="<?php _e( '* Please provide a property address!', 'framework'); ?>" required/>
<div class="map-wrapper">
<button class="real-btn goto-address-button" type="button" value="address"><?php _e( 'Find Address','framework' ); ?></button>
<div class="map-canvas"></div>
<input type="hidden" name="location" class="map-coordinate" value="<?php if( isset( $post_meta_data['REAL_HOMES_property_location'] ) ){ echo $post_meta_data['REAL_HOMES_property_location'][0]; } ?>" />
</div>
</div>
<div class="form-option">
<label for="featured-image"><?php _e('Property Featured Image','framework'); ?></label>
<div id="featured-thumb-container" class="clearfix">
<?php
if( has_post_thumbnail( $target_property->ID ) ){
echo '<div class="gallery-thumb">';
echo get_the_post_thumbnail( $target_property->ID, 'thumbnail' );
echo '<a class="remove-featured-image" data-property-id="'.$target_property->ID.'" href="'. site_url("/wp-admin/admin-ajax.php") .'" ><i class="fa fa-trash-o"></i></a>';
echo '<span class="loader"><i class="fa fa-spinner fa-spin"></i></span>';
echo '</div>';
}
?>
</div>
<div id="featured-file-container" class="<?php if(has_post_thumbnail( $target_property->ID )){ echo "hidden"; }?>" >
<input id="featured-image" name="featured_image" type="file" title="<?php _e( '* Please provide image with proper extension! Only .jpg .gif and .png are allowed.!', 'framework'); ?>" class="image required" required/>
<div class="field-description">
<?php _e('Image should have minimum width of 770px and minimum height of 386px. ( Bigger image will be cropped automatically )','framework'); ?>
</div>
</div>
</div>
<div class="form-option">
<label><?php _e('Gallery Images','framework'); ?></label>
<div id="gallery-thumbs-container" class="clearfix">
<?php
$thumbnail_size = 'thumbnail';
$properties_images = rwmb_meta( 'REAL_HOMES_property_images', 'type=plupload_image&size='.$thumbnail_size, $target_property->ID );
if( !empty($properties_images) ){
foreach( $properties_images as $prop_image_id=>$prop_image_meta ){
echo '<div class="gallery-thumb">';
echo '<img src="'.$prop_image_meta['url'].'" alt="'.$prop_image_meta['title'].'" />';
echo '<a class="remove-image" data-property-id="'.$target_property->ID.'" data-gallery-img-id="'.$prop_image_id.'" href="'. site_url("/wp-admin/admin-ajax.php") .'" ><i class="fa fa-trash-o"></i></a>';
echo '<span class="loader"><i class="fa fa-spinner fa-spin"></i></span>';
echo '</div>';
}
}
?>
</div>
<label><?php _e('Add more images to gallery','framework'); ?></label>
<div id="gallery-images-container">
<div class="controls-holder"><input class="gallery-image image" name="gallery_image_1" type="file" /></div>
</div>
<button id="add-more" class="real-btn"><?php _e('Add More','framework'); ?></button>
<div class="field-description">
<?php _e('Provide images for gallery on property detail page. Images should have minimum width of 770px and minimum height of 386px. ( Bigger images will be cropped automatically )','framework'); ?>
</div>
</div>
<div class="form-option">
<label><?php _e('What to display in agent information box ?','framework');?></label>
<div class="agent-options">
<input id="agent_option_none" type="radio" name="agent_display_option" value="none" <?php if( isset($post_meta_data['REAL_HOMES_agent_display_option']) && ($post_meta_data['REAL_HOMES_agent_display_option'][0] == "none") ){ echo "checked"; } ?> />
<label for="agent_option_none"><?php _e('None','framework'); ?></label> <small><?php _e('( Agent information box will not be displayed )','framework'); ?></small>
<br/>
<input id="agent_option_profile" type="radio" name="agent_display_option" value="my_profile_info" <?php if( isset($post_meta_data['REAL_HOMES_agent_display_option']) && ($post_meta_data['REAL_HOMES_agent_display_option'][0] == "my_profile_info") ){ echo "checked"; } ?> />
<label for="agent_option_profile"><?php _e('My profile information','framework');?></label> <small> <?php _e('( You can add your profile information here )','framework');?></small>
<br/>
<input id="agent_option_agent" type="radio" name="agent_display_option" value="agent_info" <?php if( isset($post_meta_data['REAL_HOMES_agent_display_option']) && ($post_meta_data['REAL_HOMES_agent_display_option'][0] == "agent_info") ){ echo "checked"; } ?> />
<label for="agent_option_agent"><?php _e('Display an agent\'s information','framework'); ?></label>
<select name="agent_id" id="agent-selectbox">
<?php generate_posts_list('agent',$post_meta_data['REAL_HOMES_agents'][0]); ?>
</select>
</div>
</div>
<div class="form-option">
<?php wp_nonce_field( 'submit_property', 'property_nonce' ); ?>
<input type="hidden" name="action" value="update_property"/>
<input type="hidden" name="property_id" value="<?php echo $target_property->ID; ?>"/>
<input type="submit" value="<?php _e('Submit Property','framework');?>" class="real-btn" />
</div>
Have you tried to use
header("location:thepagethatyouwantreach.php");
in the case that the form it's correctly submitted?
//controlls
/if submission it's ok
header("location:thepagethatyouwantreach.php"); //redirect the user
Right now, when I submit a form, I get this in my URL:
http://www.taiwantalk.org/users/admin/edit/?updated=true
It's a form to updates an user's profile (I'm using Wordpress
but I guess that ?updated=true is a php thing).
I want to build a if-statement with that information:
if ( form=updated] ) {
//do this
}
How to build an if-statement based on the submitted or updated status of the form?
EDIT:
The source code of the form (just in case):
<form id="bbp-your-profile" action="<?php bbp_user_profile_edit_url( bbp_get_displayed_user_id() ); ?>" method="post">
<h2 class="entry-title"><?php _e( 'Name', 'bbpress' ) ?></h2>
<?php do_action( 'bbp_user_edit_before' ); ?>
<fieldset class="bbp-form">
<legend><?php _e( 'Name', 'bbpress' ) ?></legend>
<?php do_action( 'bbp_user_edit_before_name' ); ?>
<div>
<label for="first_name"><?php _e( 'First Name', 'bbpress' ) ?></label>
<input type="text" name="first_name" id="first_name" value="<?php echo esc_attr( bbp_get_displayed_user_field( 'first_name' ) ); ?>" class="regular-text" />
</div>
<div>
<label for="last_name"><?php _e( 'Last Name', 'bbpress' ) ?></label>
<input type="text" name="last_name" id="last_name" value="<?php echo esc_attr( bbp_get_displayed_user_field( 'last_name' ) ); ?>" class="regular-text" />
</div>
<div>
<label for="nickname"><?php _e( 'Nickname', 'bbpress' ); ?></label>
<input type="text" name="nickname" id="nickname" value="<?php echo esc_attr( bbp_get_displayed_user_field( 'nickname' ) ); ?>" class="regular-text" />
</div>
<div>
<label for="display_name"><?php _e( 'Display name publicly as', 'bbpress' ) ?></label>
<?php bbp_edit_user_display_name(); ?>
</div>
<?php do_action( 'bbp_user_edit_after_name' ); ?>
</fieldset>
<h2 class="entry-title"><?php _e( 'Contact Info', 'bbpress' ) ?></h2>
<fieldset class="bbp-form">
<legend><?php _e( 'Contact Info', 'bbpress' ) ?></legend>
<?php do_action( 'bbp_user_edit_before_contact' ); ?>
<div>
<label for="url"><?php _e( 'Website', 'bbpress' ) ?></label>
<input type="text" name="url" id="url" value="<?php echo esc_attr( bbp_get_displayed_user_field( 'user_url' ) ); ?>" class="regular-text code" />
</div>
<?php foreach ( bbp_edit_user_contact_methods() as $name => $desc ) : ?>
<div>
<label for="<?php echo $name; ?>"><?php echo apply_filters( 'user_'.$name.'_label', $desc ); ?></label>
<input type="text" name="<?php echo $name; ?>" id="<?php echo $name; ?>" value="<?php echo esc_attr( bbp_get_displayed_user_field( 'name' ) ); ?>" class="regular-text" />
</div>
<?php endforeach; ?>
<?php do_action( 'bbp_user_edit_after_contact' ); ?>
</fieldset>
<h2 class="entry-title"><?php bbp_is_user_home() ? _e( 'About Yourself', 'bbpress' ) : _e( 'About the user', 'bbpress' ); ?></h2>
<fieldset class="bbp-form">
<legend><?php bbp_is_user_home() ? _e( 'About Yourself', 'bbpress' ) : _e( 'About the user', 'bbpress' ); ?></legend>
<?php do_action( 'bbp_user_edit_before_about' ); ?>
<div>
<label for="description"><?php _e( 'Biographical Info', 'bbpress' ); ?></label>
<textarea name="description" id="description" rows="5" cols="30"><?php echo esc_attr( bbp_get_displayed_user_field( 'description' ) ); ?></textarea>
<span class="description"><?php _e( 'Share a little biographical information to fill out your profile. This may be shown publicly.', 'bbpress' ); ?></span>
</div>
<?php do_action( 'bbp_user_edit_after_about' ); ?>
</fieldset>
<h2 class="entry-title"><?php _e( 'Account' ) ?></h2>
<fieldset class="bbp-form">
<legend><?php _e( 'Account' ) ?></legend>
<?php do_action( 'bbp_user_edit_before_account' ); ?>
<div>
<label for="user_login"><?php _e( 'Username', 'bbpress' ); ?></label>
<input type="text" name="user_login" id="user_login" value="<?php echo esc_attr( bbp_get_displayed_user_field( 'user_login' ) ); ?>" disabled="disabled" class="regular-text" />
<span class="description"><?php _e( 'Usernames cannot be changed.', 'bbpress' ); ?></span>
</div>
<div>
<label for="email"><?php _e( 'Email', 'bbpress' ); ?></label>
<input type="text" name="email" id="email" value="<?php echo esc_attr( bbp_get_displayed_user_field( 'user_email' ) ); ?>" class="regular-text" />
<?php
// Handle address change requests
$new_email = get_option( bbp_get_displayed_user_id() . '_new_email' );
if ( $new_email && $new_email != bbp_get_displayed_user_field( 'user_email' ) ) : ?>
<span class="updated inline">
<?php printf( __( 'There is a pending email address change to <code>%1$s</code>. Cancel', 'bbpress' ), $new_email['newemail'], esc_url( self_admin_url( 'user.php?dismiss=' . bbp_get_current_user_id() . '_new_email' ) ) ); ?>
</span>
<?php endif; ?>
</div>
<div id="password">
<label for="pass1"><?php _e( 'New Password', 'bbpress' ); ?></label>
<fieldset class="bbp-form">
<input type="password" name="pass1" id="pass1" size="16" value="" autocomplete="off" />
<span class="description"><?php _e( 'If you would like to change the password type a new one. Otherwise leave this blank.', 'bbpress' ); ?></span>
<input type="password" name="pass2" id="pass2" size="16" value="" autocomplete="off" />
<span class="description"><?php _e( 'Type your new password again.', 'bbpress' ); ?></span><br />
<div id="pass-strength-result"></div>
<span class="description indicator-hint"><?php _e( 'Hint: The password should be at least seven characters long. To make it stronger, use upper and lower case letters, numbers and symbols like ! " ? $ % ^ & ).', 'bbpress' ); ?></span>
</fieldset>
</div>
<?php if ( !bbp_is_user_home() ) : ?>
<div>
<label for="role"><?php _e( 'Role:', 'bbpress' ) ?></label>
<?php bbp_edit_user_role(); ?>
</div>
<?php endif; ?>
<?php if ( is_multisite() && is_super_admin() && current_user_can( 'manage_network_options' ) ) : ?>
<div>
<label for="role"><?php _e( 'Super Admin', 'bbpress' ); ?></label>
<label>
<input type="checkbox" id="super_admin" name="super_admin"<?php checked( is_super_admin( bbp_get_displayed_user_id() ) ); ?> />
<?php _e( 'Grant this user super admin privileges for the Network.', 'bbpress' ); ?>
</label>
</div>
<?php endif; ?>
<?php do_action( 'bbp_user_edit_after_account' ); ?>
</fieldset>
<?php do_action( 'bbp_user_edit_after' ); ?>
<fieldset class="submit">
<legend><?php _e( 'Save Changes', 'bbpress' ); ?></legend>
<div>
<?php bbp_edit_user_form_fields(); ?>
<button type="submit" id="bbp_user_edit_submit" name="bbp_user_edit_submit"><?php bbp_is_user_home() ? _e( 'Update Profile', 'bbpress' ) : _e( 'Update User', 'bbpress' ); ?></button>
</div>
</fieldset>
</form>
if (isset($_GET['updated']) && $_GET['updated'] == 'true') {
//do this
}
You can use $_GET["updated"]. See here for more information on $_GET and the other predefined variables.
Try with POST instead of GET, because your form has POST method declared, and checking the submit button instead of a variable:
if (isset($_POST['bbp_user_edit_submit'])) {
//do this
}
if(isset($_REQUEST['updated']) && $_REQUEST['updated'] == "true"){
`//do process`
}