I need some help with a custom call for wlpe. I want to have a simple signup for my clients and have more detail in their profile edit page if they wish to fill it out. As you can see, I’m using a fairly basic registration call... All i want is the following fields to be required email, username, fullname, password, tos, formcode. I have also created a custom field for a company name. If you don’t fill in the fields asked, it is warning you however, if you fill them all in and the captcha code it keeps saying the captcha code is incorrect. Am I missing something here?
Thanks
Reg call
[!WebLoginPE? &type=`register` &userImage=`250000,250,250` ®isterTpl=`registerTpl` &loginFormTpl=`loginTpl` ®isterSuccessTpl=`successfulTpl` &groups=`Clients` ®Required=`email,username,fullname,password,tos,formcode` &customFields=`company`!]
Form
[+wlpe.message+]
<div style="padding:20px 20px 20px 0px; margin: 0 auto;text-align:right; width:400px ">
<form id="wlpeUserRegisterForm" action="[~[*id*]~]" method="post" enctype="multipart/form-data">
<h3>Register for your personalised Client Account</h3>
<p>
<span class="info">Fields marked with <span class="required">*</span> are required.</span>
</p>
<fieldset style="margin: 0 auto;border: 0px dashed rgb(85, 85, 85); padding: 20px; margin-bottom: 0px;margin-top:50px; text-align: right; line-height:40px">
<h3>User Details</h3>
<p>* Username
<label for="wlpeUserRegisterUserName"><span class="required"></span>
<input size="30" id="wlpeUserRegisterUserName" type="text" name="username" value="[+post.username+]" />
</label></p>
<p>* Real Name
<label for="wlpeUserRegisterFullName"><span class="required"></span>
<input size="30" id="wlpeUserRegisterFullName" type="text" name="fullname" value="[+post.fullname+]" />
</label></p>
<p>Company
<label for="wlpeUserRegistercompany">
<input size="30" id="wlpeUserRegistercompany" type="text" name="company" value="[+post.company+]" />
</label></p>
<p>* Email
<label for="wlpeUserRegisterEmail"><span class="required"></span>
<input size="30" id="wlpeUserRegisterEmail" type="text" name="email" value="[+post.email+]" />
</label></p>
</fieldset>
<fieldset style="margin: 0 auto;border: 0px dashed rgb(85, 85, 85); padding: 20px; margin-bottom: 0px;margin-top:50px; text-align: right; line-height:40px">
<h3>Password</h3>
<p>* Password
<label for="wlpeUserRegisterPassword"><span class="required"></span>
<input size="30" id="wlpeUserRegisterPassword" type="password" name="password" value="[+post.password+]" />
</label></p>
<p>* Password (confirm)
<label for="wlpeUserRegisterPasswordConfirm"><span class="required"></span>
<input size="30" id="wlpeUserRegisterPasswordConfirm" type="password" name="password.confirm" value="[+post.password.confirm+]" />
</label></p>
</fieldset>
<fieldset style="margin: 0 auto;border: 0px dashed rgb(85, 85, 85); padding: 20px; margin-bottom: 0px;margin-top:50px; text-align: right; line-height:40px">
<h3>Avatar & Signature</h3>
<img id="wlpeUserDefaultImage" src="assets/snippets/webloginpe/userimages/logodefault.png" alt="Default User Image" title="Default User Image" height="250" width="250" />
<p>Upload Avatar</p> <label for="wlpeUserProfilePhoto" id="photolabel">
<input id="wlpeUserProfilePhoto" type="file" name="photo" />
</label>
<p id="wlpeUserProfilePhotoInfo" class="info"></p><p>200kb Max and images are resized to 250 x 250px</p>
<p>Comment/Signature</p>
<label for="wlpeUserProfileComment">
<textarea id="wlpeUserProfileComment" rows="8" cols="40" name="comment">[+user.comment+]</textarea>
</label>
</fieldset>
<div style="overflow:auto;height:200px;margin: 0 auto;border: 0px dashed rgb(85, 85, 85); padding: 60px; margin-bottom: 0px;margin-top:0px; text-align: left;">
[+tos+]
</div>
<fieldset style="margin: 0 auto;border: 0px dashed rgb(85, 85, 85); padding: 20px; margin-bottom: 0px;margin-top:0px; text-align: center;">
<h3>Acceptance & Anti Spam</h3>
<p><span class="required">*</span>I accept the Terms of Service<label for="wlpeTosCheckbox" id="wlpeTosCheckboxLabel">
<input size="20" type="checkbox" id="wlpeTosCheckbox" name="tos" />
</label></p>
<div> <img id="wlpeCaptchaImage" src="manager/includes/veriword.php" width="148" height="60" alt="If you have trouble reading the code, click on the code itself to generate a new random code." /></div>
<p><span class="required">*</span>Please enter the code in the image. </p>
<p> <label for="wlpeUserRegisterCaptcha" id="wlpeCaptchaLabel">
<input type="text" id="wlpeUserRegisterCaptcha" name="formcode" />
</label></p>
<button type="submit" id="wlpeSaveRegisterButton" name="service" value="register">Register</button>
<button type="submit" id="wlpeCancelRegisterButton" name="service" value="cancel">Cancel</button>
</fieldset>
</form>
</div>
Next is my profile edit page. I want the user to be able to see their info as they registered and give them MORE fields to fill in if they wish to, such as address1, address2 and check boxes for their skills in design etc. Thing is, the user can save the page with ALL their info deleted out of the fields, now if you can force them to fill in fields on registration how can I force them to at least keep some fields in their profile? The default templates etc does not stop the user from emptying their details and saving which makes their profile useless.
Profile call
[!WebLoginPE? &type=`profile` &userImage=`250000,250,250` &profileTpl=`profileTpl` ®Required=`email,username,fullname,formcode`!]
Summary of my main concerns that I need help with... why doesn’t the captcha code work with my code and say it’s not input correctly. If I take the captcha code out, all fields are saved as should be.
How do I stop profiles being saved without certain fields being filled in.
sorry, it might not be entirely clear what I am doing but hopefully the gurus understand it enough. Thanks.