VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: serhiox on October 17, 2013, 18:43:20 PM

Title: Mandatory fields in registration
Post by: serhiox on October 17, 2013, 18:43:20 PM
Hello,
I published mandatory fields in registration form, but there is no * next to field name. And also it's not showing what these fields are mandatory.
Where is my mistake or what shuold i configure?
Picture:
(http://s21.postimg.org/6insruzbr/trinti.jpg)
Title: Re: Mandatory fields in registration
Post by: serhiox on October 20, 2013, 06:58:12 AM
Please , any ideas?
Title: Re: Mandatory fields in registration
Post by: Melmoi on April 30, 2015, 17:01:08 PM
same problem :(
Title: Re: Mandatory fields in registration
Post by: GJC Web Design on April 30, 2015, 17:11:39 PM
these don't show mandatory because if u enable guest checkout as well they aren't

I know that isn't a solution.. I wrote on here ages ago a fix for VM2 that worked for both cases  - no idea if it will work for vm3

but the simplest way is if u never have guest checkout is to do it in the template

in the loop of fields add something like

<label class="<?php echo $field['name'] ?>" for="<?php echo $field['name'] ?>_field">
<?php echo $field['title'] ;
if($field['required'] || $field['name'] == 'username' || $field['name'] == 'password'  ) echo ' <span style="color:red">*</span>'; ?>
                  </label>

you get the idea

Title: Re: Mandatory fields in registration
Post by: Melmoi on April 30, 2015, 19:41:16 PM
Thanks for your answer :)

Problem is I would like to have both registration and guest checkout :(

I did not not it was a problem in virtuemart from a long time... Guess I'll need to choose between registration an guest checkout :(
Title: Re: Mandatory fields in registration
Post by: Melmoi on April 30, 2015, 19:45:22 PM
I desasctivated guest checkout but the problem is still here : only e-mail is required, it is gonna make me mad :s
Title: Re: Mandatory fields in registration
Post by: GJC Web Design on May 02, 2015, 23:26:40 PM
QuoteI wrote on here ages ago a fix for VM2 that worked for both cases  - no idea if it will work for vm3

all you've got to do is find it and see if it works

if your not using guest then->

Quotebut the simplest way is if u never have guest checkout is to do it in the template

in the loop of fields add something like

<label class="<?php echo $field['name'] ?>" for="<?php echo $field['name'] ?>_field">
<?php echo $field['title'] ;
if($field['required'] || $field['name'] == 'username' || $field['name'] == 'password'  ) echo ' <span style="color:red">*</span>'; ?>
                  </label>

you get the idea