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

    Currently re-developing a school site with privacy in mind. We have the following requirements:


    • Small part of site is visible to all (easy)
    • Parents should be able to self-register (doable, certainly with WebLoginPE)
    • It should be very difficuly for somebody else to register. We were thinking of making a required field in which new registers should enter a code that gets distributed in school (possible? If so, how?)
    • Next to the general wug_Parents (web user group), they may select in their profile a number of groups in which their childeren are currently in. (possible? If so, how can be flexible in registering people to various web user groups?

    Any help appreciated.
      • 26482
      • 138 Posts
      Replying to my own thread...

      I’ve dropped the requirement for automatically assigning new registers to various web groups. Too complicated, will do by hand.
      But that leaves me with this...

      We need to have a new field in the registration, I assume this is a custom field. Then this custom field needs to be validated to a specific code.

      Is this possible? If so, can somebody point me in the right direction? Thanks.
        • 2912
        • 315 Posts
        I use WebLoginPE and it is pretty easy to allow for extra fields. Here’s my snippet for a Users Profile:

        [!WebLoginPE? &type=`profile` &profileTpl=`ProfilePE` &customFields=`email_password,company_telno,company_faxno,company_position,company_address`!]

        notice the customFields!

        In order to use the custom fields in the form my chunk for the profile (ProfilePE) includes this:

        			<fieldset id="email_password">
        					<legend id="email_password">Email Password</legend>
        					<input id="email_password" type="text" name="email_password" value="[+user.email_password+]" /><br/>
        			</fieldset>
        
        			<fieldset id="company_address">
        					<legend id="company_address">Company Address:</legend>
        				<textarea id="company_address" name="company_address" rows="5">[+user.company_address+]</textarea><br />
        					<!--<input id="company_address" type="text" name="company_address" value="[+user.company_address+]" /><br/>-->
        			</fieldset>
        
        			<fieldset id="company_telno">
        					<legend id="company_telno">Company Tel No:</legend>
        					<input id="company_telno" type="text" name="company_telno" value="[+user.company_telno+]" /><br/>
        			</fieldset>
        
        			<fieldset id="company_faxno">
        					<legend id="company_faxno">Company Fax No:</legend>
        					<input id="company_faxno" type="text" name="company_faxno" value="[+user.company_faxno+]" /><br/>
        			</fieldset>
        
        			<fieldset id="company_position">
        					<legend id="company_position">Company Position:</legend>
        					<input id="company_position" type="text" name="company_position" value="[+user.company_position+]" /><br/>
        			</fieldset>



        The extra data is stored in a new data table "{prefix}_web_user_attributes_extended".

        I’m not sure whether the customFields works with the users registration I’ve never tried it. As for checking some data in a custom field with something else I have a couple of ideas but I feel it may involved writing something yourself.

        Hope the aobve helps though.
          BBloke
          • 26482
          • 138 Posts
          Quote from: BBloke at Nov 10, 2009, 09:27 AM

          I use WebLoginPE and it is pretty easy to allow for extra fields. Here’s my snippet for a Users Profile:

          [!WebLoginPE? &type=`profile` &profileTpl=`ProfilePE` &customFields=`email_password,company_telno,company_faxno,company_position,company_address`!]

          notice the customFields!

          In order to use the custom fields in the form my chunk for the profile (ProfilePE) includes this:

          			<fieldset id="email_password">
          					<legend id="email_password">Email Password</legend>
          					<input id="email_password" type="text" name="email_password" value="[+user.email_password+]" /><br/>
          			</fieldset>
          
          			<fieldset id="company_address">
          					<legend id="company_address">Company Address:</legend>
          				<textarea id="company_address" name="company_address" rows="5">[+user.company_address+]</textarea><br />
          					<!--<input id="company_address" type="text" name="company_address" value="[+user.company_address+]" /><br/>-->
          			</fieldset>
          
          			<fieldset id="company_telno">
          					<legend id="company_telno">Company Tel No:</legend>
          					<input id="company_telno" type="text" name="company_telno" value="[+user.company_telno+]" /><br/>
          			</fieldset>
          
          			<fieldset id="company_faxno">
          					<legend id="company_faxno">Company Fax No:</legend>
          					<input id="company_faxno" type="text" name="company_faxno" value="[+user.company_faxno+]" /><br/>
          			</fieldset>
          
          			<fieldset id="company_position">
          					<legend id="company_position">Company Position:</legend>
          					<input id="company_position" type="text" name="company_position" value="[+user.company_position+]" /><br/>
          			</fieldset>



          The extra data is stored in a new data table "{prefix}_web_user_attributes_extended".

          I’m not sure whether the customFields works with the users registration I’ve never tried it. As for checking some data in a custom field with something else I have a couple of ideas but I feel it may involved writing something yourself.

          Hope the aobve helps though.

          Hi, thanks. I’ve added a custom field that works. Now I need to write a plugin to check this customfield for its value. I read this thread, added a sample plugin, attached it to OnBeforeWebUserSave, but it isn’t fired. Are the suggested modifications really necessary for WebloginPE to use MODx System events?