Self Registration No Password Required/Password Hardcoded
Self Registration No Password Required/Password Hardcoded
Hi all, long time solution-finder, first time help requester...
I have a Self Registration Form set up, but I do not want people to need to enter a password. Basically, I am using this form in a way that enters a competition and enables the client to export all registrants to a CSV file - which is why I have not simply used a regular formbuilder form. If anyone can help with the tags to hardcode a password for every user (such as xzy123 or similar), that would be amazing.
Appreciate any assistance!
I have a Self Registration Form set up, but I do not want people to need to enter a password. Basically, I am using this form in a way that enters a competition and enables the client to export all registrants to a CSV file - which is why I have not simply used a regular formbuilder form. If anyone can help with the tags to hardcode a password for every user (such as xzy123 or similar), that would be amazing.
Appreciate any assistance!
Re: Self Registration No Password Required/Password Hardcoded
You can use jQuery to hide password fields and assign selected value to them.
vilkis
vilkis
Re: Self Registration No Password Required/Password Hardcoded
Great idea! Any pointers on how to implement?
Re: Self Registration No Password Required/Password Hardcoded
OK, post here Registration Template from "Registration Template 1" tab. I have idea how to do it without jQuery - just Smarty magic 
vilkis

vilkis
Re: Self Registration No Password Required/Password Hardcoded
Win an iPod Shuffle!
Simply enter your details in the form below, and you'll go into the draw to win a fantastic iPod Shuffle! We'll be in touch shortly to let you know if you've won!
{if isset($message) && $message != ''}
{if isset($error) && $error != ''}
{$message}
{else}
{$message}
{/if}
{/if}
{$startform}
{if $controlcount > 0}
{foreach from=$controls item=control}
{$control->hidden}
{if $control->color != ''}
color};">{$control->prompt}{$control->marker}
{elseif $control->hideme !=''}{$control->prompt}{$control->marker}
{else}
{$control->prompt}{$control->marker}
{/if}
{$control->control}
{/foreach}
{if isset($captcha)}
Please enter the text from the image below:
{$input_captcha}
{$captcha}
{/if}
{$hidden}{if isset($hidden2)}{$hidden2}{/if}{$submit}
If you have already completed the entry form, but did not receive an email, you can re-send it {$link_sendanotheremail}
{/if}
{$endform}
Re: Self Registration No Password Required/Password Hardcoded
I have modified the template. Keep me informed if it works for you.
Code: Select all
<!-- Registration 1 template -->
<h2>Win an iPod Shuffle!</h2>
<p>Simply enter your details in the form below, and you'll go into the draw to win a fantastic iPod Shuffle! We'll be in touch shortly to let you know if you've won!</p>
{if isset($message) && $message != ''}
{if isset($error) && $error != ''}
<p><font color="red">{$message}</font></p>
{else}
<p>{$message}</p>
{/if}
{/if}
<div class="contest">
{$startform}
{if $controlcount > 0}
<table width="500px">
{foreach from=$controls item=control}
<tr>
<td width="300px"class="label">{$control->hidden}
{if $control->name eq 'password' OR $control->name eq 'repeatpassword'}
{capture assign=inputname}input_{$control->name}{/capture}
{$mod->CreateInputHidden($selfregactionid, $inputname, 'PASSWORD')}
{else}
{if $control->color != ''}
<span style="color:{$control->color};">{$control->prompt}{$control->marker}</span>
{elseif $control->hideme !=''}<span style="display:none;">{$control->prompt}{$control->marker}</span>
{else}
{$control->prompt}{$control->marker}
{/if}
</td>
<td class="showhide">{$control->control}</td>
</tr>
{/if}
{/foreach}
{if isset($captcha)}
<tr>
<td style="text-align:right;">
Please enter the text from the image below:
</td>
<td>{$input_captcha}</td>
</tr>
<tr>
<td colspan="2" style="text-align:right;">{$captcha}</td>
</tr>
{/if}
<tr>
<td></td>
<td id="submit">{$hidden}{if isset($hidden2)}{$hidden2}{/if}{$submit}</td>
</tr>
<tr>
<td colspan="2"><p>If you have already completed the entry form, but did not receive an email, you can re-send it {$link_sendanotheremail}</p></td>
</tr>
</table>
{/if}
{$endform}
</div>
<!-- Registration 1 template -->
Re: Self Registration No Password Required/Password Hardcoded
Thankyou! I will try this as soon as possible...
At the moment I have found a messy solution by editing the source files to add a default value for the password fields and adding a 'hideme' attribute, then in the template and CSS I added an {if} statement to look for the extra attribute and the display:none if present. Messy but effective - your solution is much more elegant and versatile!
I will keep you informed of how this goes when I restore the default files.
At the moment I have found a messy solution by editing the source files to add a default value for the password fields and adding a 'hideme' attribute, then in the template and CSS I added an {if} statement to look for the extra attribute and the display:none if present. Messy but effective - your solution is much more elegant and versatile!
I will keep you informed of how this goes when I restore the default files.
Re: Self Registration No Password Required/Password Hardcoded
How to do the same, but for the username also??? I need to hide both user and password???
Hope you can help me.
Hope you can help me.
Re: Self Registration No Password Required/Password Hardcoded
Hi,
usernames should be unique. So such a solution will allow to register once
So you need UDT that generates new unique username for each registration event.
vilkis
usernames should be unique. So such a solution will allow to register once

So you need UDT that generates new unique username for each registration event.
vilkis
Re: Self Registration No Password Required/Password Hardcoded
Oki thanks for your anwer. I notices that yersterday. But UDT, is it a settings in the module?