Grigorii Kotkovskii
asked on
How to cancel a mandatory (required) field in Virtuemart form submission process?
Hello
I want to free my future site's visitors from having to fill out the form before submitting their name, e-mail and a phone No. Basically, in most cases it won't be needed for them to also add more information in the form's text box. But the default (current) status is that they must at least type a single word before they're allowed to submit the form. I'll attach screenshot to better clarify the issue and also provide a link to a live site where you can see it in a real life situation.
https://www.profilecreations.co.za/index.php/products/desktop-stationery/blockpads/pvc-blockpad-detail
It's a Joomla's Virtuemart shop. Latest Joomla version and VM3 working together. In a product detail page there's an "Ask A Question" button. After it's clicked, you get a contact form, in which one can input their contact info and fill out the text box below and press "Send your question" button just below. My goal is just to directly contact the potential client by using their e-mail or a phone number. I don't need them to necessarily provide me with more information in that text box rectangle. What I know so far is that there's a Virtuemart controller PHP file that makes sure that the required text box is filled out before the form's submission. This one: components/com_virtuemart/ controller s/productd etails.php I'll also attach it to this post. It must be modified so that there wouldn't be a requirement of filling out that text box befere one can submit the form. Here's the link to the real live site's product detail page with an "Ask A Question" button in the middle.
Product Detail Page with an "Ask A Question" button
screenshot.png
productdetails.php
I want to free my future site's visitors from having to fill out the form before submitting their name, e-mail and a phone No. Basically, in most cases it won't be needed for them to also add more information in the form's text box. But the default (current) status is that they must at least type a single word before they're allowed to submit the form. I'll attach screenshot to better clarify the issue and also provide a link to a live site where you can see it in a real life situation.
https://www.profilecreations.co.za/index.php/products/desktop-stationery/blockpads/pvc-blockpad-detail
It's a Joomla's Virtuemart shop. Latest Joomla version and VM3 working together. In a product detail page there's an "Ask A Question" button. After it's clicked, you get a contact form, in which one can input their contact info and fill out the text box below and press "Send your question" button just below. My goal is just to directly contact the potential client by using their e-mail or a phone number. I don't need them to necessarily provide me with more information in that text box rectangle. What I know so far is that there's a Virtuemart controller PHP file that makes sure that the required text box is filled out before the form's submission. This one: components/com_virtuemart/
Product Detail Page with an "Ask A Question" button
screenshot.png
productdetails.php
A support question without contact information is useless. A request for support without some indication of what the problem is almost useless and doesn't allow the correct responder to get tasked with contacting the user.
ASKER
I'm asking a purely technical PHP question. If I needed a business advice, I would've asked my mom :-)
Of course, I will be getting contacts from potential clients. That's the whole idea! If you've visited the live site at all...
As per the text box rectangle... it's still gonna be there! So if needed anyone could use it. It's just that I doubt that most people will.
Anyhow... my question still stands...
Of course, I will be getting contacts from potential clients. That's the whole idea! If you've visited the live site at all...
As per the text box rectangle... it's still gonna be there! So if needed anyone could use it. It's just that I doubt that most people will.
Anyhow... my question still stands...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I wish you weren't here :-)
ASKER
Just to be clear... The first file location is:
components/com_virtuemart/ views/askq uestion/tm pl/form.ph p
components/com_virtuemart/