It's not hard to do actually. Just add a post_submission function that uses the form entry id. All you need to know is the ID of the form you're using and the IDs of the fields you want to work with.
You can stick this whole thing in your theme functions file, then make it take effect by adding this right afterwards:
add_action("gform_post_submission", "create_wp_user", 10, 2);
If you want to have the password emailed to the user you can do that as well, I didn't bother in this case. The more likely scenario is you're letting them pick a password themselves so you'd simply get rid of the wp_generate_password() part and use the value they submitted.
Posted 14 years ago on Friday June 25, 2010 |
Permalink