Hi,
I need to add some additional features to the form for front end posting.
current form is working well but i would like to be able to add a tickbox to confirm terms and conditions aswell as possibly adding a field for tags.
Is this possible with the front end posting plugin?
if so could you point me to any examples please
thanks
Hi Simon,
Thank you for the question.Please see
https://buddydev.com/support/forums/topic/custom-post-fields-in-buddyblog/#post-1637
Regards
BrajeshThat’s great how do I make something a required field?
Hi Simon,
You may use the ‘bsfep_validate_post’ filter to add validation errors. Here is an example(I am assuming that we are looking for a input name ‘test’add_filter( 'bsfep_validate_post', function ( $err, $post_data ) { $input_name = 'test'; if ( isset( $post_data[ $input_name ] ) ) { // validate // let us say, it did not validate, we override the $err $err = array( 'message' => 'test field failed validation', 'error' => true ); } return $err; }, 10, 2 );
Please do know that the validation strategy is bad(It would have been much better if we had used WP_Error to allow adding multiple errors) but it is from our old days and the validation filter was included without much thought.
I look forward to rewrite it in near future.
Regards
Brajesh
You must be logged in to reply to this topic.