Forums / Setup & design / Contact form without collected info

Contact form without collected info

Author Message

Marko Žmak

Wednesday 06 December 2006 1:54:38 am

I would like to create a contact form which doesn't collect information, but without collected info, just to send an email, a not to collect any data in the database.

In some previous versions of eZ there was "form/process" for this but I heard (seen) that from some version forward this was obsolete and "ActionCollectInformation" should be used.

Could someone tell me what's the right way to use a contact form just for sennding mail and not ocllecting data?

P.S. I'm using eZ 3.8.6.

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Łukasz Serwatka

Wednesday 06 December 2006 2:46:05 am

Hi Marko,

Create a new module with 2 views (form,send). Then you will have full control on it. It should be very easy. form/process is very simple and might not fits for your all needs.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Marko Žmak

Thursday 07 December 2006 3:40:29 am

What I need here is a really simply functionality.

I need to send an email with the data that user entered, and display the name of the node from wich it was sent.

So it seems that form/process has all the functionality I need for this. Also I don't wish to write a new eZ module for such a simply need.

But when I try to use form/process I get error message saying that the module i disabled. How can I enable it and will this module be present in eZ in the future or it will be removed as obsolete?

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Marko Žmak

Thursday 07 December 2006 3:48:31 am

OK. I found out how to enable the form module:

http://ez.no/community/forum/install_configuration/form_processing_error

But now I need soemthing else. What template is used to generate the email that is sent?

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Christian Johansen

Thursday 07 December 2006 3:54:57 am

Turn on debug output and list of used templates, then send yourself an email, and it will tell you what template it is using :)

Marko Žmak

Thursday 07 December 2006 3:57:10 am

Yes, that was the first idea, I did it before asking for help on the forum. But it doesn't work. I turned on TemplateDebug, and I have template names displayd everywhere but not in the email I receive. Why? How can I find out what template is used for email generation of form/process?

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Claudia Kosny

Thursday 07 December 2006 4:08:47 am

Hi Marko

Just check the source of /kernel/form/process.php and you will see that there is no template used at all. The email content is just a concat of (almost) all post variables.

Claudia

Marko Žmak

Thursday 07 December 2006 7:05:06 am

Uh... that's not good. It seems like I will have to use ActionCollectInformation. It has indeed much more possibilities, but here's what's bugging me about it...

I just want to send an email with the data from contact form and not collect it in the database. For this purpose I really don't have any need to have the submited data collected. Actually I don't even want it in the database, because it will just accumulate for no reason, and I'll have to remove the collected info from time to time.

So is there a way of using this action, but without collecting any data? And also without having to write a custome module for it? Some INI setting or similar maybe?

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Claudia Kosny

Thursday 07 December 2006 7:14:27 am

Hi Marko

As I don't know of another built in way to send formdata you either have to put up with infocollection or write your own module.

Actually you just could copy the kernel/form folder into an extension and add the necessary files to make a full module out of this. Then just rewrite the process.php so that it uses a template to format the posted data. 20 minutes work max (unless you need a really fancy template)

Claudia

Łukasz Serwatka

Thursday 07 December 2006 7:16:33 am

Marko, I would choose "new module" way, as suggested before. It is only few lines of code. There is no other way, to catch data and send it via mail in eZ publish beside infocollection or form/process. Based on experience I knew that form/process will be not enough ;) Extension gives even more, since mail content can be tamplate based as well, so can be easily change in future.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Marko Žmak

Monday 11 December 2006 1:43:47 am

Although I have never before created a custom module, now that I've inspected the eZ module system it seems like writin custom module is not that complicated as I tought. I'll think i'll go for the new module sollution, copy-paste the exsisting code for information collection and remove the piece of code where the data is stored. I'll let you know about the results.

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

eZ debug

Timing: Jan 20 2025 17:40:43
Script start
Timing: Jan 20 2025 17:40:43
Module start 'content'
Timing: Jan 20 2025 17:40:44
Module end 'content'
Timing: Jan 20 2025 17:40:44
Script end

Main resources:

Total runtime1.4466 sec
Peak memory usage4,096.0000 KB
Database Queries222

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0056 587.8125180.8281
Module start 'content' 0.00561.3025 768.6406738.1250
Module end 'content' 1.30810.1385 1,506.7656348.4609
Script end 1.4466  1,855.2266 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00390.2707210.0002
Check MTime0.00140.0952210.0001
Mysql Total
Database connection0.00070.049710.0007
Mysqli_queries1.343892.88942220.0061
Looping result0.00260.18262200.0000
Template Total1.415897.920.7079
Template load0.00210.144920.0010
Template processing1.413797.719820.7068
Template load and register function0.00010.007310.0001
states
state_id_array0.00180.127810.0018
state_identifier_array0.00070.049120.0004
Override
Cache load0.00170.1162480.0000
Sytem overhead
Fetch class attribute can translate value0.00190.130850.0004
Fetch class attribute name0.00100.0719130.0001
XML
Image XML parsing0.00150.101150.0003
class_abstraction
Instantiating content class attribute0.00000.0025190.0000
General
dbfile0.00840.5805370.0002
String conversion0.00000.000430.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
8content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
11content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
11content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 32
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs