News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

How to add Custom Field Company to "Ask A Question"?

Started by evin63, May 24, 2013, 00:32:43 AM

Previous topic - Next topic

evin63

Hi, I'm using joomla 2.5.11 and VM 2.0.20b
I would like to know how to add custom field Company Name  to the forms provided for "Call for Price" and "Ask a Question about Product".

My VM is as catalog and  it's only for registered users.
So when a logged user open from the product detail "Ask a Question about Product".
I need an extra field Company fill with the company name (as Name and e-mail)
So when the vendors receive the e-mail can recognize the user by the company name.

I read some other thread on this question (as a sample to add phone)
but when I try to modify the code for add company, something goes wrong

Here my code for form.php
      <div class="inputs">
            <label><span><?php echo JText::_('COM_VIRTUEMART_USER_FORM_NAME')  ?> : </span><input type="text" class="validate[required,minSize[4],maxSize[64]]" value="<?php echo $this->user->name ?>" name="name" id="name" size="30"  validation="required name"/></label>
            
            <label><span><?php echo JText::_('COM_VIRTUEMART_SHOPPER_FORM_COMPANY_NAME')  ?> : </span><input type="text" class="validate[required,minSize[4],maxSize[64]]" value="<?php echo $this->user->company ?>" name="company" id="company" size="30"  validation="required company"/></label>
         
            <label><span><?php echo JText::_('COM_VIRTUEMART_USER_FORM_EMAIL')  ?> :</span> <input type="text" class="validate[required,custom[email]]" value="<?php echo $this->user->email ?>" name="email" id="email" size="30"  validation="required email"/></label>
         </div>

Can anyone please help me?

Thanks
Regards