PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Picking Theme from User Registration Form

  1. I am working on a site that will allow users to register, create their own site and then ONLY be able to access and edit their site from the front-end, never seeing the dashboard, etc. I will basically have a "store" of different themes they can choose from and I'd like the User Registration form to allow them to pick their theme from a list while registering and then that theme is automatically activated on their new site...is that possible?

    Posted 12 years ago on Saturday February 25, 2012 | Permalink
  2. This is very possible. However, it will require some basic knowledge of PHP, WordPress Codex, GravityForms API, and HTML / CSS.

    GravityForms Online Docs to Review:

    WordPress Codex Docs to Review:
    The WordPress function get_themes() returns an array of themes each containing an array of the following theme attributes:

    - Name
    - Title
    - Description
    - Author
    - Author Name
    - Author URI
    - Version
    - Template
    - Stylesheet
    - Template Files
    - Stylesheet Files
    - Template Dir
    - Stylesheet Dir
    - Status
    - Screenshot
    - Tags
    - Theme Root
    - Theme Root URI

    By calling get_themes(), you'll be able to loop through the available themes to build out the HTML select box that would be loaded as a new option in the Gforms User Registration.

    Much of this code could reside in your theme functions.php file.

    As I was writing this response, I was thinking about prototyping something for you. Before I continue, how familiar are you with referencing and writing PHP on your own? Do you need the step by step walk through?

    Best Regards,

    David Carroll

    Posted 12 years ago on Monday February 27, 2012 | Permalink
  3. As David said above, some of this is possible using the Gravity Forms and the User Registration Add-On, however it's not going to do everything you described out of the box.

    It can be used to register and create users, however it does not currently allow the user to select the theme associated with their new site. It defaults to whatever the default theme for new sites on your multi-site network is setup to use.

    We do plan on adding the ability to select the theme in a future update to the User Registration Add-On.

    Beyond that... Gravity Forms isn't going to provide any features or functionality that would allow the user to completely manage the new site from the frontend. Gravity Forms is only going to create the new user and create the new site, it has no involvement after that. So you would need another solution for allowing them to then manage that new site from the frontend.

    Posted 12 years ago on Thursday March 1, 2012 | Permalink
  4. Thank you both for your responses (sorry, I read these a while ago and am just now getting around to replying).

    David, I would love it if you or someone could help me walk through this step-by-step, I can edit PHP and have a tiny bit of experience writing PHP myself but definitely not my strong point.

    Carl - thank you for your response. I do know that Gravity Forms won't allow editing from the front-end, I have that part covered with another type of plugin, sorry, I may not have said that in my original post.

    Thank You both, I look forward to future responses. Thanks!!!

    Posted 12 years ago on Friday March 16, 2012 | Permalink