We are using aMember on a Web site where members may wish to remain anonymous, even from us. On the other hand, we need to get paid, at least for non-free products. Is it possible to make the first and last name fields optional, or is that required for all the payment gateways? If it's required, we'll keep them, but it might increase signups for us if the names are optional. For instance, with PayPay I believe that the only require the users e-mail address (PayPal account). Are there other payment gateways (common ones, not oddball ones) that require that the name be entered on our site?
Well, you could modify the various templates (with the exception of singup) to hide the field from view?
Does aMember, or any plug-ins, depend on those fields being present? If they are hidden from view, will it break something? If we hid them, would we have to supply random dummy values behind the scenes or something? Can we make them optional, rather than hiding them? Or is this not a good idea in the first place?
By hiding them I am suggesting something a bit less complex such as marking the field as not visible or even applying a style of white text on white background. I guess it depends on how critical TRUE anonymity is to you and your site because then you need to discuss the fact that details are in logs (payment transaction logs) as well as payment records, etc.
Can we simply mark the fields as optional in the form? Will blank name fields break any payment gateways (or aMember itself)?
I'd like to know the answer too. I tried to just comment out the section asking for the names in signup.html in the templates folder. Figured this wouldn't work but wanted to see what would happen. When you submit the form it still comes back and says to enter first and last name. Not sure which call is checking for names. Thanks
i think marking the fields optional can solve this, or there are options in the templets through you can remove what ever your want to..
<tr> <th width="40%">#_TPL_SIGNUP_NAME# *<br /> <div class="small">#_TPL_SIGNUP_NAME_1#</div></th> <td nowrap="nowrap"><input class="required" type="text" name="name_f" value="{$smarty.request.name_f|escape}" size="15" /> <input type="text" class="required" name="name_l" value="{$smarty.request.name_l|escape}" size="15" /> </td> </tr> The above is from templates\signup.html Even if you remove class="required", when the user submits the form an error still pops up in red asking to enter names. * Please enter your First Name * Please enter your Last Name So where downstream is this check taking place? I'm sure there is something else that needs to be turned off, changed, or commented out. Just can't seem to find it. Thanks
I haven't tried it, but seems you could modify the signup.html template to make the fields hidden, and provide them default values, like this: modify this: <input class="required" type="text" name="name_f" value="{$smarty.request.name_f|escape}" size="15" /> to read: <input type="hidden" name="name_f" value="fakeLastName" size="15" /> and same for last name. Hope this helps
You could do that... and just give the First Name/Last Name values with User/Anonymous for all users, and then allow them to change that if they wish to from the "edit profile" page itself. If you truly want to hide those fields and never ask for them, you'd have to edit signup.html/signup.php and remove all the checks for first name and last name, as well as edit profile.html/profile.php in the same manner too.
I want to do something similar. But instead of removing the names, I want to remove the need for membership type and payment system. This is how the signup.html section reads: Code: tr> <th>#_TPL_SIGNUP_MEMB_TYPE# *</th> <td> {foreach from=$products item=p} {if count($products)>1} {if $config.select_multiple_products} <input class="required" type="checkbox" id="product{$p.product_id}" name="product_id[]" value="{$p.product_id|escape}" {if in_array($p.product_id, (array)$smarty.request.product_id)}checked="checked"{/if} /> {else} <input class="required" type="radio" id="product{$p.product_id}" name="product_id" value="{$p.product_id|escape}" {if $p.product_id == $smarty.request.product_id }checked="checked"{/if} /> {/if}{* end if $config.select_multiple_products *} {else} <input type="hidden" id="product{$p.product_id}" name="product_id" value="{$p.product_id}" /> {/if} <label for="product{$p.product_id}"><b>{$p.title}</b> ({$p.terms})<br /> <span class="small">{$p.description}</span></label><br /> {if $p.price <= 0.0 } {assign var="paysys_id_not_required" value="1"} {/if} {/foreach} </td> </tr> {* Select Payment System in same way, only if its count > 1 *} {if $smarty.request.hide_paysys } <input type="hidden" name="paysys_id" value="{$smarty.request.hide_paysys|escape}"> <input type="hidden" name="hide_paysys" value="{$smarty.request.hide_paysys|escape}"> {else} {if $config.product_paysystem} {assign var="paysys_id_not_required" value="1"} {else} <tr> <th>#_TPL_SIGNUP_PAYSYS# *</th> <td> {foreach from=$paysystems item=p} {if count($paysystems)>1} <input type="radio" id="paysys_id{$p.paysys_id}" name="paysys_id" value="{$p.paysys_id|escape}" {if $p.paysys_id eq $smarty.request.paysys_id }checked{/if} /> {else} <input type="hidden" id="paysys_id{$p.paysys_id}" name="paysys_id" value="{$p.paysys_id|escape}" /> {/if}<label for="paysys_id{$p.paysys_id}"><b>{$p.title}</b> <span class="small">{$p.description}</span></label><br /><br /> {/foreach} </td> </tr> {/if} {/if} I've tried commenting out this block of code. It eliminates those fields from the signup form, but returns with the following errors. Thanks! renee
there's a simpler way, guys... just add style="display:none;" to TR tags in those rows where membership type and payment system are defined... that way you don't mess up the requirements for amember to run properly, and you get to hide those fields from the end user
Thanks for the help. It worked perfectly for the payment system, but I'm still getting this error about the membership type: Here's that section of the member.html template Code: <tr style="display:none"> <th>#_TPL_SIGNUP_MEMB_TYPE# *</th> <td> {foreach from=$products item=p} {if count($products)>1} {if $config.select_multiple_products} <input class="required" type="checkbox" id="product{$p.product_id}" name="product_id[]" value="{$p.product_id|escape}" {if in_array($p.product_id, (array)$smarty.request.product_id)}checked="checked"{/if} /> {else} <input class="required" type="radio" id="product{$p.product_id}" name="product_id" value="{$p.product_id|escape}" {if $p.product_id == $smarty.request.product_id }checked="checked"{/if} /> {/if}{* end if $config.select_multiple_products *} {else} <input type="hidden" id="product{$p.product_id}" name="product_id" value="{$p.product_id}" /> {/if} <label for="product{$p.product_id}"><b>{$p.title}</b> ({$p.terms})<br /> <span class="small">{$p.description}</span></label><br /> {if $p.price <= 0.0 } {assign var="paysys_id_not_required" value="1"} {/if} {/foreach} </td> </tr> {* Select Payment System in same way, only if its count > 1 *} {if $smarty.request.hide_paysys } <input type="hidden" name="paysys_id" value="{$smarty.request.hide_paysys|escape}"> <input type="hidden" name="hide_paysys" value="{$smarty.request.hide_paysys|escape}"> {else} {if $config.product_paysystem} {assign var="paysys_id_not_required" value="1"} {else} <tr style="display:none"> <th>#_TPL_SIGNUP_PAYSYS# *</th> <td> {foreach from=$paysystems item=p} {if count($paysystems)>1} <input type="radio" id="paysys_id{$p.paysys_id}" name="paysys_id" value="{$p.paysys_id|escape}" {if $p.paysys_id eq $smarty.request.paysys_id }checked{/if} /> {else} <input type="hidden" id="paysys_id{$p.paysys_id}" name="paysys_id" value="{$p.paysys_id|escape}" /> {/if}<label for="paysys_id{$p.paysys_id}"><b>{$p.title}</b> <span class="small">{$p.description}</span></label><br /><br /> {/foreach} </td> </tr> {/if} {/if} renee
It worked! I used the Signup Link Wizard and now it works like a charm. Thanks so much for your help. renee
Is there no Amember admin who can andswer tarfos qustion? How to change the fieldes First name and Surname from requiered to optional Not hide them just change the value.