Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trouble with adding fields and JForm #43

Open
ggirol opened this issue Dec 30, 2020 · 3 comments
Open

Trouble with adding fields and JForm #43

ggirol opened this issue Dec 30, 2020 · 3 comments
Assignees
Milestone

Comments

@ggirol
Copy link

ggirol commented Dec 30, 2020

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!

@andrewscaya
Copy link
Owner

andrewscaya commented Jan 11, 2021

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: #29 (comment).

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!

@andrewscaya andrewscaya self-assigned this Jan 11, 2021
@ggirol
Copy link
Author

ggirol commented Jan 12, 2021

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:

/**
* Contains an integer of the maximum number of configurable fields.
*
* @var int
* @SInCE 2.0.0
*
* NOTE to developers: just increase this number for more fields
* BUT you will have to also increase the number of entries in mod_simpleemailform.xml
*/
protected $maxFields = 8;

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 : -(

@andrewscaya
Copy link
Owner

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!).

@andrewscaya andrewscaya added this to the 3.0.0 milestone Jan 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants