Jump to content

Remove user input fields from 'add new contact' form


peto

Recommended Posts

Hi, I'm trying to remove some input fields from the "Add new contact" page, so that the client who wants to add a contact doesnt have to write things as addresses or postcodes.

 

So, I'm editing clientareaaddcontact.tpl to achieve this and, to reduce the problem dimension, im just trying to remove the client address per now. I've tried several changes but when I try to add a new contact (logged as a client), I submit the form and then it leads me to the contact managing page, but the contact isn't added and no error message appears.

 

I've tried to edit these lines:

 

<tr>
 <td class="fieldarea">{$LANG.clientareaaddress1}</td>
 <td><input type="text" name="address1" value="{$contactaddress1}" size="25" /></td>
</tr>
<tr>
 <td class="fieldarea">{$LANG.clientareaaddress2}</td>
 <td><input type="text" name="address2" value="{$contactaddress2}" size="25" /></td>
</tr>

 

Replacing them with hidden input fields:

 

<input type="hidden" name="address1" value="NULL"/>
<input type="hidden" name="address2" value="NULL" />

 

And replacing them with normal but unrendered text fields:

 

<input style="display: none" type="text" name="address1" value="NULL"/>
<input style="display: none" type="text" name="address2" value="NULL" />

 

And none of these 2 solutions seems to work. It has something to do with the validation i think, because im just commenting the company name field (a non required input field) from the form and the contact gets added.

 

Any idea of this?

 

Thanks in advance

Héctor

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated