Forum Replies Created
-
Well I wrote too fast my answer and didn’t test it properly : it does not work :'(
The page output looks good but it’s not recording the data in the database.
I’ll look forward to solve this and if any specialist wanna come in… welcome,Vincent
Hey Pixelguy,
you raised an issue I had to tackled and thanks to @graylien it works fine.
As you also mentioned I had the save button repeated each “tab” and I found a solution that seems working so far but I would love real tech guy to confirm it’s not a mistake 🙂at the end of the edit.php file we worked on you can find this :
<?php do_action( 'bp_after_profile_field_content' ); ?> <div class="submit"> <input type="submit" name="profile-group-edit-submit" id="profile-group-edit-submit" value="<?php esc_attr_e( 'Save Changes', 'buddypress' ); ?> " /> </div> <input type="hidden" name="field_ids" id="field_ids" value="<?php bp_the_profile_field_ids(); ?>" /> <?php wp_nonce_field( 'bp_xprofile_edit' ); ?> </form> <?php endwhile; endif; ?> <?php do_action( 'bp_after_profile_edit_content' ); ?>
what I understand is that it says :
– after the form you call bp_after_profile_field_content
– then you show the button and the hidden fields
– then you close the form
– and you close the loop by endwhile – endifand @graylien gave us a trick to make the loop “looping” for every tab and not only just one so what I did was to take the endwhile -endif closing the loop inside the form and before the button so the button will remain in the form but not repeated as the loop is closed now.
<?php do_action( 'bp_after_profile_field_content' ); ?> <?php endwhile; endif; ?> <div class="submit"> <input type="submit" name="profile-group-edit-submit" id="profile-group-edit-submit" value="<?php esc_attr_e( 'Save Changes', 'buddypress' ); ?> " /> </div> <input type="hidden" name="field_ids" id="field_ids" value="<?php bp_the_profile_field_ids(); ?>" /> <?php wp_nonce_field( 'bp_xprofile_edit' ); ?> </form>
I hope that my trick is right and that my explanations are clear as I’m neither a developper nor an native english speaker 🙂
Please come back to me wether if it works,
Cheers,
vincent