Ninja Form Data copy from/to Vendor Custom Fields

Hi,

I have a Ninja Form to collect registrations for an upcoming Harvest Market single date event.

Some or Most of the users registering will already be 'vendors' (custom post-type 'vendor' done with Custom Press)
I plan on tying 'users' (capability role: vendor) to their own 'vendor' page.

My question is this: Can I or what is the best way to approach sharing common field values such as First Name, Last Name, Address etc between 'vendor' custom fields and Ninja Forms submissions.

In my dream scenario, if user is logged in and visiting the registration form, the data from his vendor profile post would auto-fill on page load. He would still be able to edit the loaded values. (Perhaps the changes made on registration form would replicate to the vendor profile as well but not necessarily, I haven't decided)

Thank you

  • Kasia Swiderska
    • Support nomad

    Hello Luc,

    In my dream scenario, if user is logged in and visiting the registration form, the data from his vendor profile post would auto-fill on page load. He would still be able to edit the loaded values. (Perhaps the changes made on registration form would replicate to the vendor profile as well but not necessarily, I haven't decided)

    Usually registration forms are visible only for the logged out users. What you need here is profile page that can be edited from front end.
    I don't think CustomPress will be much use here as it doesn't support user fields.

    I think more suitable here would be plugin like that https://pl.wordpress.org/plugins/wp-user-manager/ or that https://wordpress.org/plugins/user-meta/

    Your approach is much more complex and requires lots of custom coding, because you have to solve problem on how to automatically create custom post type post when user register and relate its to this user, then display user fields on that page, then write front end editor that would allow to edit those fields only for its owner.
    That cannot be done with quick snippet code.

    Or you can think about combining plugin for profiles, so users will be able to edit them on front end and then display their user fields on custom post types vendor pages with this function https://codex.wordpress.org/Function_Reference/get_user_meta

    Then it will be matter of creating page http://www.webmaster-source.com/2010/02/09/programmatically-creating-posts-in-wordpress/ when user register (so for example user will be author of that page)

    kind regards,
    Kasia

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.