Jump to content
Sign in to follow this  

FrontendUser Registration Form with custom fields

Recommended Posts


I'm rather new to PW. (And loving it) I have installed PW3 with the FrontendUser module. I tried the standard simple script and that worked. But now I want to add some custom fields that are in my user templates. I have created a page-field called userparent where you can choose another user. I don't know if this is relevant.

The answer is probably on this page: https://bitbucket.org/pwFoo/frontenduser/wiki/Code snippets / Examples

"Add custom form field with hook after field processed

Add an additional form field to the registration form with field processing (add value to user object) inside your template file."

But I'm having difficulty implementing the script due to my lack of knowledge.  I keep getting internal server errors. How and where do I define the custom fields I want to make available in the form? I'm not extremely good at PHP but know more than the basic stuff.

I hope someone can help me out.

Share this post

Link to post
Share on other sites

Haven't used the module before but I recommend adding

$config->debug = true;

to your config.php, during development, to get more detailed errors, so that you can debug this easier.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By fruid
      I'm using custom fields for images (as mentioned here: processwire.com/blog/posts/pw-3.0.142) for a specific images-field, the images of which need to have an HTML-caption. It works fine so far. Now I'm trying to import pages that use this field. I first exported some pages of that kind to see what the spreadsheet would look like. It seems to not separate the captions for each images but instead put all images in one cell and all captions in another.
      How could I go about importing these pages and assign the captions to the images accordingly?
    • By Rossie
      Hi Everyone,
      I wish to display a gallery of images from multiple pages on the site.  These images have custom fields created through page reference called 'furniture_list_type'.  Each image now has a radio button which has been selected.
      In  the example code below all images appear from the "gallery20", however the selector  "gallery20.furniture_list_type=3390" does not have any effect.  "3390" is the id of the page reference "chair" selected through the page reference.  I wish only images selected as chair to show.
      Hope someone can help with this.
      $imagePages = $pages->find("template=makers-child, gallery20.furniture_list_type=3390") ;                     foreach($imagePages as $p) {     echo "<ul>";     foreach($p->gallery20 as $image) {         echo "<li><img src='{$image->url}'>{$image->furniture_list_type}</li>";     }     echo "</ul>";      }
    • By humanafterall
      I'm using some Custom fields for images: 

      When I save the page, and return the fields are blank. When I re-add the text to the fields and save again then the fields save as expected.

      I know this is stated as being quite experimental but it's super useful feature I'd love to get working correctly.
      I have fields that are CKEditor fields but have overidden this on the image specific template. I've also tried it with regular text fields and I get the same bug.
      (currently using Processwire 3.0.155)
      I've found this issue is specific to editing on pages using the PageTable fieldtype. The fields are not saving when I save the page in the PageTable.
    • By gebeer
      I need to add a checkbox to the  comments form to make it GDPR compliant and I guess I'm not the only one...
      Doing a search and looking at the FieldTypeComments module file it seems that the only way to add custom fields to the form is by copying the module to  site/modules and apply the changes there.
      I am just wondering why the comment form is not driven by the PW form API and also why none of the methods in that module are hookable?
      Would be much appreciated if you could share your approaches on handling this.  
    • By Doc
      I'm building my homepage, it contains ~60 custom fields (lines or words I define & translate in the admin in different languages).
      The homepage is dynamic and my users are logged.
      I'm trying to avoid many MySQL queries to retrieve the fields I've setup in the admin, I think I can do better than 60 different queries to display that content on the home.
      Regarding performance, will markup cache a good approach here ?
      I understand it makes sense when you have a scrolldown menu which is built within a loop for example but is it still good if I cache 60x a word or a group of words in my code ?
      Another idea I had was to dynamically determine which language is used by the user and load a language file which contains the translated text (uk.inc.php) and so on... (less elegant I think, but I'll use that anyway for dynamic expressions such as "you have %nb items in your cart").
  • Create New...