If I include a post/after_submission hook in a user-registration form, and use it to do an update_post_meta() function. Will it update the current site post associated with the given ID or the post on the newly created site associated with the ID?
If I include a post/after_submission hook in a user-registration form, and use it to do an update_post_meta() function. Will it update the current site post associated with the given ID or the post on the newly created site associated with the ID?
Apparently it will always update the current blog only. Is there anyway to get field info to the new blog other than query strings?
I don't want to use query strings because I rather not direct users to the page that the information is being sent.
What is it you're trying to do exactly? Do you have any of these forms online where we can see? Can you post the code you're using at pastebin.com or pastie.org so we can see it? Thank you.
I am using the User Registration add-on on a multisite install. This form is for users creating a new site. Each site is created from a template blog. Each new blog has a profile page (front page) with an ID of 2. I want the user to fill out their profile info on the form and then the form populate the profile page on the new site with that info.
Is there a way to send a link to you other than posting in the forum?
It works if I redirect the user to their profile page first and I pass the information with query strings. However, I would rather not redirect to that page after form submission.
This was my most recent attempt, I tried to use switch_to_blog() (I have an gravity forms auto-login function, so it has it look at the current user primary blog) before the part that updates the post hoping it would then update the post of the new site, but that isn't working. I even tried with the deprecated gform_post_submission but that didn't work.
Any new ideas would be sincerely appreciated, I'm stuck
You can send a link in an email to chris@rocketgenius.com - please include a link to this topic so I know what we're talking about. Thank you.
Chris, did you have a chance to check out the link I sent?
In this paste http://pastie.org/4455712 can you verify the values that your variables hold, for debugging? So, after each variable is assigned, echo it or log it then review the values to be sure you're capturing properly them along the way. Maybe you will discover something not working exactly as you expect it to.
I went back and echoed each one to make sure. The final step of $user_info->primary_blog does return the new blog id.
I ran that on the page that is created afterwards though. On the page with the form the current_user function doesn't work since the user has not registered yet. That's why I tried the after_submission hook, hoping that when that hook ran the user would be registered by that point, but I am guessing they are not