Merge registration post with post insert

This topic contains 7 reply and 2 voices, and was last updated by foriaa 10 years, 8 months ago
Viewing 7 Posts - 1 through 7 (of 7 total)
Author Posts
July 24, 2013 at 10:22 pm 6289
foriaa Hello I need to have a form where the user can register and insert his post. If I create this 2 kinds of form after can I insert them together in a page? thank you
July 25, 2013 at 1:13 am 6293
Tareq Hasan Tareq Hasan

Inserting them together doesn’t help the user, it’ll be confusing I think.

You can create a registration form and the redirect url should point to a page with post form. So upon registering, they will be redirected to a post page.

July 25, 2013 at 5:15 pm 6312
foriaa foriaa

In realty I saw with pleasure that in the post settings there is an option to submit a post by the guests, and is it possible to register them automatically by insert a name and an email address. Great it was what I need 😉
So if it was provided maybe it is not too confusing for the users!

July 25, 2013 at 6:35 pm 6314
foriaa foriaa

Ok but now I need to have the custom fields which populate extra edit profile fields in the user profiles in backend.
In the settings I can select just a registration form 🙁

July 26, 2013 at 2:03 am 6322
Tareq Hasan Tareq Hasan

The registration form and profile forms are the same, but the use case is different. Thats why get two shortcode for a registration form (profile & register). Selecting the registration is fine 🙂

July 26, 2013 at 2:11 pm 6338
foriaa foriaa

Sorry but maybe you don’t understand what I need.
So, I need a form with registration form, enclosed some custom fields for the user profiles, and together a post form.
In the begin of this discussion you said me that it was confusing for the user, which for me is equal to say it couldn’t be create it. Ok.
After I found a great feature in your plugin, ALONE, in post form settings, where I can automatically register guest user when they submit a post. So I was near to the solution.
Now, I need to have the same custom fields asssociate to user profiles in the registration form inside the guest registration in post form, that’s all!
It should be very pleasure to get a really help by you and not only critics about what I do with my website and some very superficial replies.
I bought you PRO plugin, business pack, and I’m looking forward to be supported in the right way.
Please read well my issue and if you don’t understand ask me more details.

I hope your next replies will be more constructive then previous.

Kind regards

July 27, 2013 at 1:35 am 6359
Tareq Hasan Tareq Hasan

I completely understand what you said. I just replied to your previous question.

Anyway…
[php]
function wpufe_copy_post_meta_to_user( $post_id ) {
$custom = get_post_custom( $post_id );
$post_author = get_post_field( ‘post_author’, $post_id );

if ( $custom ) {
foreach ($custom as $meta_key => $meta) {
$meta = maybe_unserialize( reset( $meta ) );
update_user_meta($post_author, $meta_key, $meta);
}
}
}

add_action( ‘wpuf_add_post_after_insert’, ‘wpufe_copy_post_meta_to_user’ );
add_action( ‘wpuf_edit_post_after_update’, ‘wpufe_copy_post_meta_to_user’ );
[/php]

It’s a PHP snippet that you can place it in your themes functions.php. What this does is, when a user publishes a post, it copies all the post meta to that user. So in your case, when the guest registers automatically upon creating the post, all the post meta will also be copied to his user profile (user meta). I think thats what you are trying to achieve?

July 29, 2013 at 6:08 pm 6419
foriaa foriaa

Thank you for your reply.
I insert your code in my theme function.php but it doesn’t work.

However it doesn’t matter, I modified the frontend-form-post and render-form to get what I need.

thank you very much

Viewing 7 Posts - 1 through 7 (of 7 total)