xnau on "[Plugin: Participants Database] 2 forms on the same site?"

ساخت وبلاگ

Ok, So I thought I had this nailed, but ive run into 1 small problem.

i've got all the templates setup and created 2 separate forms. I am able to load back the relevant form fields on the edit page depending on the initial form filled out.

The issue i am having is with the post parent phone and email. By using the code above in my functions.php file i am able to post the parent info from the under 18 form into the main phone and email fields.

However this causes a problem on the over 18's form as the email & phone fields are expecting to = the parent email and phone fields, but they do not exist on the over 18's form.

I have edited the function to apply only to the under 18's form using the code below. This allows the over 18 form to post without issues, but the under 18 form will not post and gives me an error for the email & phone fields.

I'm not sure how correct the code below is, i have a feeling the if page is in the wrong place or i'm missing some other code that will allow the form to post.

if (is_page('under-16-registration-form') ) {
add_filter('pdb-before_submit_signup', 'xnau_copy_field_values');
function xnau_copy_field_values( $post ) { $post['email'] = $post['parent_email']; $post['phone'] = $post['parent_phone']; retu $post;
}
}

WordPress ...
ما را در سایت WordPress دنبال می کنید

برچسب : نویسنده : استخدام کار wpss بازدید : 155 تاريخ : پنجشنبه 23 ارديبهشت 1395 ساعت: 23:46