We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7155
    • 160 Posts
    Hi

    Would anyone know if users can select a "user type" with the existing tools? I would like to have different profile fields for different user types. If so, how would one go about it. Or do I have to modify WebloginPE?

    Thank-you
      • 7155
      • 160 Posts
      I solved it by creating a snippet. Am sure there are other better alternative recipes to my approach. But will share anyways.

      The snippet creates a placeholder that returns a parameter list with custom fields for WebloginPE.

      If need be, it will have to be reproduced for other WebloginPE calls on the website if you need to distinguish users. I guess it can also be used for other snippets.

      Suppose you have two Web user groups named "Individuals" and "Corporates" and you want different registration forms or details.

      Create the snippet, call it parambuilder, save the following code.


      global $modx;

      $paramList = ’’;//used to set the WebLoginPE prameters. you can place your default call for registration here.

      if($modx->isMemberOfWebGroup(array("Individuals")))
      $paramList = ’your parameter list for individuals according to WebloginPE documentation’;

      elseif($modx->isMemberOfWebGroup(array("Corporates")))
      $paramList = ’your parameter list for Corporates according to WebloginPE documentation’;

      $modx->setPlaceholder(’webloginpeParams’,$paramList);
      return;

      place the snippet call before the WebloginPE call, wherever you want the comparison to be made e.g

      [[parambuilder]]
      [!WebloginPE [+webloginpeParams+]!]
      
        • 284
        • 5 Posts
        Can anybody out here please tell me how to create a registration form and how to execute the post process of the form huh
        I have read a lot of forums but unable to get it.....