Open ggirol opened 3 years ago
Hello @ggirol,
Many thanks for sharing.
When using JForm, you have to set the number of fields in the Admin panel. The maximum number of fields is 8, as it is mentioned in the list of our features (https://extensions.joomla.org/extension/simple-email-form/).
Also, if you are using the captcha option, you must make sure to tie in your SEF instance with the Google reCAPTCHA module in order to make sure that the form will show up correctly. For information on installation and setting up the Google Recaptcha, please see Joomla's documentation here: https://docs.joomla.org/J3.x:Google_ReCaptcha.
For general information on installation, please see our documentation here: https://simple-email-form.readthedocs.io/en/stable/installation.html.
You can also have a look at my answer here: https://github.com/andrewscaya/mod_simpleemailform/issues/29#issuecomment-368574249.
If you would prefer that we have a look at your specific installation, we can help you for a small consultation fee.
Thanks and a Happy New Year to you too!
Hi Andrew,
I don't quite understand your answer. I have an older version of SEF successfully using 16 fields at a different site. The current version says in sefv2/modsimpleemailform.php:
/**
I tried increasing this to 12 and adding the extra fields in mod_simpleemailform.xml, and enabled them in the Admin panel and it did not work. Anyway, this site is a public school district and unfortunately does not have funds available for consulting fees : -(
Hi @ggirol,
This is a transition version of SEF, and some legacy code from the previous version is still around to allow for an easy transition to the new JForm version. I will have to check if JForm can allow for easy modification of the maximum number of fields. If so, we could add your issue as a feature request for the upcoming release of the JForm only version. I'll get back to you as soon as I have an answer (I'll try to keep it within the next 10 days - we're all trying to survive right now!).
Hello,
Is increasing the number of fields still supported?
I tried upping to 12 in sefv2/modsimpleemailform.php like so:
protected $maxFields = 12;
And made the required changes/additions to mod_simpleemailform.xml (see attached). All 12 potential fields appear in the Module interface, however on the public form page, no form field appear AT ALL if I choose JForm. If I choose Classic the form works but seemingly only for the first 8 fields.
I needed to get this up and running so I replaced mod_simpleemailform.xml and sefv2/modsimpleemailform.php with a virgin copies, and still no form appears if I choose JFORM (I tried multiple browsers thinking something must have been cached - same result). Classic works though, and is up and running albeit with only 8 fields: https://goffstown.k12.nh.us/index.php/covid-19-home/505-covid-test-report
Joomla version 3.9.23, PHP 7.3.25. Template is the default Protostar.
I do have an older version of SEF running on another site with 16 fields. If you are updating the extension, 16 fields might be a nice number to include by default. Eight is too few for most uses. It would be nice to be able to choose a dropdown or radio button as the email subject as well.
Thanks and Happy New Year!