Support Offline : Mon - Fri / 10am - 6pm (GMT +6)

Your Time: Our Time:

com_contact overload prevents form sending mail

Featured Lock Resolved Issue
Hi, I'm using the language school template . The template does not send anymail from the form on my contact pages

The fieldsets code :


<?php foreach ($this->form->getFieldsets() as $fieldset) : ?>
<?php if ($fieldset->name === 'captcha' && !$this->captchaEnabled) : ?>
<?php continue; ?>
<?php endif; ?>
<?php $fields = $this->form->getFieldset($fieldset->name); ?>
<?php if (count($fields)) : ?>
<fieldset>
<?php foreach ($fields as $field) : ?>
<?php echo $field->renderField(); ?>
<?php endforeach; ?>
</fieldset>
<?php endif; ?>
<?php endforeach; ?>


seemes to create a
<textarea name="jform[contact_message]" id="jform_contact_message" cols="50" rows="10" class="form-control required" required aria-required="true"></textarea>
that is blank and invisible but yet creates an invalid empty field message on send. How can I get rid of it?
Thanks.

11 Answers

Paul Frankowski - Staff

More than a month ago #Permalink
Hi,
easy to fix, just delete that folder
templates\shaper_languageschool\html\com_contact
to use default contact form from Joomla.

Fabrice

More than a month ago #Permalink
No, the overload suits me just fine, I just want to have the <textarea name="jform[contact_message]" id="jform_contact_message" cols="50" rows="10" class="form-control required" required aria-required="true"></textarea> gone. Since it is generated by the fields script, I need to find out how to get rid of it.

Paul Frankowski - Staff

More than a month ago #Permalink
As you noticed it's a required field, generated default by Joomla core.
---
So if you don't want to touch PHP/HTML code to modify that design,
I strongly suggest using a contact module instead where you can define which field should be displayed. Search on JED or use our Form Builder addon.
---
p.s.
You cannot hide by CSS, because you cannot send a message until "required" is inside field.

Is all clear now?

Fabrice

More than a month ago #Permalink
I look it up... Notice , I did not touch anything on that part, it's all out of the box language_school template...:( .
Is it all clear now?

Paul Frankowski - Staff

More than a month ago #Permalink
You asked how to customize the code, to hide textarea field which is generated by Joomla, not us - so I gave you a tip. What else you need?
Anyway, Why you have to use Joomla default contact component? You have so many options.

Fabrice

More than a month ago #Permalink
Come on Paul, I just want that contact form to do what it is supposed to do...

Paul Frankowski - Staff

More than a month ago #Permalink
Sorry, but I still don't understand.
Here is how contact form looks like.

contact-form-from-language-school.jpg

Attachments (1)

  • contact-form-from-language-school.jpg
    contact-form-from-language-school.jpg 61.7 KB

Paul Frankowski - Staff

More than a month ago #Permalink
You said:
The template does not send anymail from the form on my contact pages

Ok, I understand that part, it happens, if Mail settings are wrong.
This is part of Joomla, Check Global Configuration, Mail settings, there is even Test Mail option, Use it, then you would know where to search an issue.

---
If you think it's our fault (?!), as I told before, please delete "com_contact" folder and check again.

PLEASE

Fabrice

More than a month ago #Permalink
I don't mean this is your fault, I'm trying to understand how I can make it work.
please check out

Paul Frankowski - Staff

More than a month ago #Permalink
Follow my steps. Is so hard to delete a folder? Then we can talk.
Sorry for my irritation, but on 2 demo sites is OK.
That's why I asked you to make some tests.

---
Yes, I saw "Champ invalide : Message"

Fabrice

More than a month ago #Permalink
The tests with or without the overload have same result.
The site doesn't have any serveur sending out problems, it sends out ok elsewhere.


There are no replies made for this post yet.
Be one of the first to reply to this post!

Leaderboard (30 days)

Paul Frankowski

Paul Frankowski

Total Accepted Answers: 148
Toufiq

Toufiq

Total Accepted Answers: 102
Sifat

Sifat

Total Accepted Answers: 83
Kamruzzaman Alam

Kamruzzaman Alam

Total Accepted Answers: 2
B

blueoceanyyc

Total Accepted Answers: 1

116

Templates

299303

Community Users

Newsletter

Don’t miss any updates of our new templates and extensions and all the astonishing offers we bring for you.
We never spam

Joomla! ® name is used under a limited license from Open Source Matters in the United States and other countries. JoomShaper.com is not affiliated with or endorsed by Open Source Matters or the Joomla! Project.

Connect Us