Easiest way to remove a field from the contact form

Hi all

What would be the easiest way to remove a field from the contact form? Which documents do I need to remove the value from?

Thanks
Milos

We're working on this and I've ping'd @palej about it. Hopefully we'll have an update in the coming days.

The current {{form}} tag is just a set format. I'll check if some fields can be hidden with CSS. Can you tell us which one are you trying to hide?

Hi Palej

I want to remove the telephone field. I've managed to remove it by removing some code, but had the issue with email sending as I think it was checking for all fields having a value.

Milos

Thanks for trying it out @Milos2504. Will bring this up to the team and see if we can provide a workaround while working on a permanent fix. Thanks!

Thank you. Let us know if you come up with a solution.

Hi Milos, how did you build the form? Ex: With Just forms? If you have the form HTML, and it's just about hiding it, you can surround the form field HTML with an invisible div:

This line is visible
<div style="display:none">This line is hidden</div>
Yet another another line!

Anything inside that "div" due to the display:none will be hidden.

Live example: https://jsfiddle.net/t4029han/1/

I actually deleted some lines from the form tag file. The issue would that would be that the field would be empty, and then the error message would show up saying please fill in the field.

Ideally, typing 'none' in the tel input field should hide the field and stop checking if it's mandatory field or not..

1 Like

Hm.. Thanks. We will look into this for a future bugfix. Although the next one will focus on fixing blogging and navigation.

Hi @Milos2504.. Thinking more on it, the better fix, if you needed to hack the code, is probably to change the HTML to input type="hidden". This would likely require code. I'll look into this more for future releases.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.