zikula-modules / Formicula

A template-driven form mailer for Zikula
https://ziku.la
19 stars 7 forks source link

Better documentation and defaults #44

Closed nmpetkov closed 11 years ago

nmpetkov commented 11 years ago
  1. If enable simple captcha, it is not working with default Zikula configuration for ztemp directory - generated images for captcha are not accessible to be shown in the form. In same time config var for formicula cache directory is read only and can not be changed to other place. Decision: put in documentation statement for the user to create a .httaccess file in formicula_cache directory allowing png|gif|jpg.
  2. Adding custom fields is not well documented. Example is with format for the custom field: custom0data but default form is in array format, and it is not very easy to discover, that custom field have to be in format: custom[0][data] custom[0][name] custom[0][mandatory] Decision: provide an example for custom field in above format.
  3. There is build-in capability for uploading and attaching files to e-mail but implementation is not very easy because no enough info. Decision: put an example, or better provide in default form capability to attach files. (Put enctype="multipart/form-data" in form tag; and proper custom field.
espaan commented 11 years ago

Hi, thanks for checking. Documentation is a good point. Commenting on the points you mention:

1) Formicula should create the temp dir in the System Temp location and make a htaccess file in there. https://github.com/zikula-ev/Formicula/blob/master/src/modules/Formicula/lib/Formicula/Installer.php#L240 In my test install that worked fine. So if it doesn't in your case, that's not the intention.

2) custom fields are indeed no documented that good. It's more of an example forms show how it works. In the docs in the manual.txt https://github.com/zikula-ev/Formicula/blob/master/src/modules/Formicula/docs/manual.txt the old plain form of the custom data is described. The new array form that does not need the indexnumber any more is not documented there yet. The example form number 3 does use the array form quite nicely: https://github.com/zikula-ev/Formicula/blob/master/src/modules/Formicula/templates/forms/3_userform.html So that is the example for how to use it. Did you have the right download ? Since all example forms in templates/forms use the new array form for custom data.

3) This might indeed need an example, I have not used attachments and the default contact form with attachements seems a bit much regarding spam and virusses etc. But you have a good point there

nmpetkov commented 11 years ago

Thank you for answering so fast :-)

About 1.) Indeed I tested in upgrade of old instalation, and it is possible .htaccess file was missed. Anyway mentioning in doc file in 2-3 lines is good idea I think.

About 2.) Really missed to see form number 3. But same - in docs can be mentioned for array possibility, also in few lines.

About 3.) It is really very usefull to have possibility to attach files. It is possible to be non-default, or configurable, but example form will be very safe-time for users. I managed to make this working, works very good, and I can send my form - to be put as one more example form.

espaan commented 11 years ago

Hi,

Ok so to be done for next release:

nmpetkov commented 11 years ago

Ok, I’m trying to send a zip file, as template files are 3: form, confirmation, and mail to sender.

nmpetkov commented 11 years ago

See #48 and #49.