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

    I think I’m doing something wrong when using the "form." syntax.

    I expect that the following will output one text field and one select field


    [!WebLoginPE? 
    	&type=`register` 
    	&regType=`verify` &registerTpl=`registerTpl` 
    	&groups=`WebUsers` 
    	&customFields=`firstName, selectTest` 
    	&inputHandler=`First Name:firstName:firstName:text||Select Test:selectTest:selectTest:select:Select 1(Select 1),Select 2(Select 2)`
    !]


    [+wlpe.message+]
    <div id="wlpeRegister">
    	<form id="wlpeRegisterForm" name="wlpeRegisterForm" action="[~[*id*]~]" method="POST">
    		<fieldset id="wlpeRegisterFieldset">
    			
    			[+form.firstName+]
    			[+form.testSelect+]
    			
    			
    		</fieldset>
    		<fieldset id="wlpeRegisterButtonFieldset">
    			<button type="submit" id="wlpeRegisterButton" name="service" value="register">Register</button>
    			<button type="submit" id="wlpeRegisterCancelButton" name="service" value="cancel">Cancel</button>
    		</fieldset>
    	</form>
    </div>



    Shouldn’t [+form.firstName+] and [+form.testSelect+] output an input and a select field?

    Thanks



      • 28042 ☆ A M B ☆
      • 24,524 Posts
      The inputHandler works with multiple-choice type input; it is for remembering the "selected" or "checked" status of select, radio or checkbox fields. For text or textarea, your form needs to have the fields with the placeholder in the value attribute.
      <label for="wlpeUserRegisterFirstName"><span class="required">*</span> First Name
      	<input id="wlpeUserRegisterFirstName" type="text" name="firstname" value="[+post.firstname+]" />
      	</label>
      

        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 5340
        • 1,624 Posts
        What about a select field?

        Do you have a working example?
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          See the documentation that comes with WLPE. Particularly the forms.html page.
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org