AP: Required email field when not logged in
Hello Rahul,
Here’s the question we’ve been skype about.
1. Required email field when not logged in
2. After sending the form check off there is a user with that email.
- If not: Then make a user account with nickname from everything before the @ and use the email
- If found then use that one for email correspodation if someone react on the question
I hope this is enough information.
greetz Rik
@rahul: Nice job and almost there, a few fixes i think.
- syntax error on:
public function __construct() {public function __construct() {
add_action( ‘ap_ask_form_fields’, [ __CLASS__, ‘ap_ask_form_fields’ ] ); add_action( ‘ap_after_new_question’, [ __CLASS__, ‘save_custom_meta’ ], 1, 2 ); } - I see the option when i’m login. Can you fix that it not visible or that there is the email of the login of the user.
- I get a email that there is a new question with user Anonymous when i’m not login and the user exist.
- If the user exist is the question then linked to the account ?
- When no user exist it makes a account and i think that is working. I get a email with the user info and not Anonymous. So i think this is ok.
I will send bij email FTP and login of the panel.
Great Job 🙂
Hello Rik,
Include below file in your theme or just paste it in theme’s functions.php
Please update this code compatible with the latest anspress version. It is not working in for Anspress 4. As the ap_ask_form_fields has been deprecated in newer version. Thanks.
@rahul you see this ?