Hello there,
i am new to forms. I downloaded the component, created a form in my html editor und updoaded it. It works fine.
Now i want to create a form where users can ordner info material, its an migration from component mos_forms.
For example i have 30 fields:
info button 10x15 cm: <number>
info button 20x30 cm: <number>
info poster A4: <number>
info poster A3: <number>
The person who gets the order emails wishes to see only the ordered material in the email.
So now i need a way to supress the not filled fields in the email.
Has anyone an idea which way i can go to achieve this?
Best regards
Andre
i am new to forms. I downloaded the component, created a form in my html editor und updoaded it. It works fine.
Now i want to create a form where users can ordner info material, its an migration from component mos_forms.
For example i have 30 fields:
info button 10x15 cm: <number>
info button 20x30 cm: <number>
info poster A4: <number>
info poster A3: <number>
The person who gets the order emails wishes to see only the ordered material in the email.
So now i need a way to supress the not filled fields in the email.
Has anyone an idea which way i can go to achieve this?
Best regards
Andre
Hi Andre,
It's fairly simple to do. You'll need to create an email template and put in some php 'if' clauses like this:
Bob
It's fairly simple to do. You'll need to create an email template and put in some php 'if' clauses like this:
<?php
if ( $_POST['info_poster_A4'] > 0 ) {
echo "Info Poster: ".$_POST['info_poster_A4']."<br />";
}
if . . .
?>
This is a basic version. Personally, I'd probably save all the data in the database, then use an array to cycle through checking the results. Gives you the same result with much more compact and manageable code.
Bob
Hi Bob, I to have the same question I tried your PHP code & when added to the Email Template I get the error message in the email.
Parse error: syntax error, unexpected '.', expecting '(' in /home/youadmin/public_html/ezy/components/com_chronocontact/chronocontact.php(307) : eval()'d code on line 5
Any help would be appreciated.
Kent
Parse error: syntax error, unexpected '.', expecting '(' in /home/youadmin/public_html/ezy/components/com_chronocontact/chronocontact.php(307) : eval()'d code on line 5
Any help would be appreciated.
Kent
Hi Kent,
Looks like a typo somewhere - I think my code is OK (though I'm not immune from typos). Please cut and paste your html here between [ code] and [ /code] tags. Or, if you prefer, take a form backup and email it to me at the address in my sig.
Bob
Looks like a typo somewhere - I think my code is OK (though I'm not immune from typos). Please cut and paste your html here between [ code] and [ /code] tags. Or, if you prefer, take a form backup and email it to me at the address in my sig.
Bob
Could someone do a screen shot of this process with more step by step using the latest version. I can't really follow at what point and where the php code or array is actually fitting in. Thanks. [file name=Code_looks_like_this_and_the_output_is_preferred.doc size=35840]http://www.chronoengine.com/components/com_fireboard/uploaded/files/Code_looks_like_this_and_the_output_is_preferred.doc[/file]<br><br>Post edited by: sailsmart, at: 2008/04/22 18:35
I'm with the same problem, Nobody have another idea?
junior_duda, which Chronoforms version do you have installed ?
Max
Max
I'm using Chronoforms V3.1 RC2
good, please show me :
#1- your form code!
#2- email template code
#3- a real email data received with the problem!
regards
Max
#1- your form code!
#2- email template code
#3- a real email data received with the problem!
regards
Max
Greetings Bob/Max,
I'm also attempting to hide unfilled fields in a file upload form I created. In this form a registered user can upload up to 3 files and I have 1 of them setup to be required so at least 1 file has to get uploaded. I tried out your code Bob but I couldn't get it to work. I want it set up so that if no files are selected in fields "file_2" and "file_3" I don't want it to show in the e-mail.
Here's how I've set up the code you supplied:
and here's what I'm getting in the confirmation e-mail:
Username: Flash
File 1: 20100510143754_greenplanet.jpg
File 2: {file_2}
File 3: {file_3}
So since Files 2 & 3 has no files uploaded I want it to just have the File 1: 20100510143754_greenplanet.jpg
Can you please help point me in the right direction? Please let me know if I can provide you with any more information.
I'm also attempting to hide unfilled fields in a file upload form I created. In this form a registered user can upload up to 3 files and I have 1 of them setup to be required so at least 1 file has to get uploaded. I tried out your code Bob but I couldn't get it to work. I want it set up so that if no files are selected in fields "file_2" and "file_3" I don't want it to show in the e-mail.
Here's how I've set up the code you supplied:
<?php
if ( $_POST['file_2'] > 0 ){
return "File 2: ".$_POST['file_2']."<br />";
}
if ( $_POST['file_3'] > 0 ){
return "File 3: ".$_POST['file_3']."<br />";
}
?>
and here's what I'm getting in the confirmation e-mail:
Username: Flash
File 1: 20100510143754_greenplanet.jpg
File 2: {file_2}
File 3: {file_3}
So since Files 2 & 3 has no files uploaded I want it to just have the File 1: 20100510143754_greenplanet.jpg
Can you please help point me in the right direction? Please let me know if I can provide you with any more information.
Hi chronoflash,
You haven't said where you've put this code?? As you've used 'return' rather than 'echo' I assume that it's not in the Email Template??
Bob
You haven't said where you've put this code?? As you've used 'return' rather than 'echo' I assume that it's not in the Email Template??
Bob
Oops, sorry about that Bob.
I did place the code in the email template. I turned off the the template editor as you stated in a different thread. I changed "echo" to "return" since it wasn't working for me I was experimenting a little but I haven't had any success.
Here's the code in its entirety for you to view, please note I changed "return" back to "echo":
I did place the code in the email template. I turned off the the template editor as you stated in a different thread. I changed "echo" to "return" since it wasn't working for me I was experimenting a little but I haven't had any success.
Here's the code in its entirety for you to view, please note I changed "return" back to "echo":
<div class="form_item">
<div class="form_element cf_heading">
<h1 class="cf_text"><strong><span style="text-decoration: underline;">Uploaded File(s)</span></strong></h1>
</div>
</div>
<div class="form_item">
<div class="form_element cf_textbox"><br />Username: {Username}</div>
</div>
<div class="form_item">
<div class="cfclear"><br />File 1: {file_1}<br />File 2: {file_2} <br />File 3: {file_3}</div>
</div>
<?php
if ( $_POST['file_2'] > 0 ){
echo "File 2: ".$_POST['file_2']."<br />";
}
if ( $_POST['file_3'] > 0 ){
echo "File 3: ".$_POST['file_3']."<br />";
}
?>
Hi flash,
That helps . . . but then the output you showed earlier looks correct, it's all coming from this line
Bob
That helps . . . but then the output you showed earlier looks correct, it's all coming from this line
<div class="cfclear"><br />File 1: {file_1}<br />File 2: {file_2} <br />File 3: {file_3}</div>
This will showFile 1: 20100510143754_greenplanet.jpg
File 2: {file_2}
File 3: {file_3}
Bob
Would you happen to know of a method to use to have those two fields "hidden" if the user only uploads one file? Or "hide" the 3rd field if two files are uploaded?
So instead of the end result looking like this ( this is actually the result I was getting before I added your code ):
Username: Flash
File 1: 20100510143754_greenplanet.jpg
File 2: {file_2}
File 3: {file_3}
it would look like this:
Username: Flash
File 1: 20100510143754_greenplanet.jpg
So instead of the end result looking like this ( this is actually the result I was getting before I added your code ):
Username: Flash
File 1: 20100510143754_greenplanet.jpg
File 2: {file_2}
File 3: {file_3}
it would look like this:
Username: Flash
File 1: 20100510143754_greenplanet.jpg
Hi Bob,
Could it be a problem depending on which version of Chronoforms I'm running? I hope not because a) and this will sound a bit noob-ish, I can't seem to locate where to find out that information and b) I don't know the proper procedure to update to a newer version ( if I even need to ).
I'm not sure why it's not working for me. It's not a huge deal since the email confirmation is just getting sent to me and one other person internally but wanted to give it a shot to make it look a bit more professional.
Could it be a problem depending on which version of Chronoforms I'm running? I hope not because a) and this will sound a bit noob-ish, I can't seem to locate where to find out that information and b) I don't know the proper procedure to update to a newer version ( if I even need to ).
I'm not sure why it's not working for me. It's not a huge deal since the email confirmation is just getting sent to me and one other person internally but wanted to give it a shot to make it look a bit more professional.
Hi flash,
You can see the version number from Extensions | Install/Uninstall | Components. As long as you have a recent version this shouldn't make much difference.
Please post the actual Email Template code you are using here so that I can see it all together.
Bob
You can see the version number from Extensions | Install/Uninstall | Components. As long as you have a recent version this shouldn't make much difference.
Please post the actual Email Template code you are using here so that I can see it all together.
Bob
Hi Bob,
Thanks for the information on where to find what software versions I have.
Here's the email template code ( including the code you provided ):
Thanks for the information on where to find what software versions I have.
Here's the email template code ( including the code you provided ):
<div class="form_item">
<div class="form_element cf_heading">
<h1 class="cf_text"><strong><span style="text-decoration: underline;">Uploaded File(s)</span></strong></h1>
</div>
</div>
<div class="form_item">
<div class="form_element cf_textbox"><br />Username: {Username}</div>
</div>
<div class="form_item">
<div class="cfclear"><br />File 1: {file_1}<br />File 2: {file_2}<br />File 3: {file_3}</div>
</div>
<?php
if ( $_POST['file_2'] > 0 ){
echo "File 2: ".$_POST['file_2']."<br />";
}
if ( $_POST['file_3'] > 0 ){
echo "File 3: ".$_POST['file_3']."<br />";
}
?>
Hi flash,
Yes . . . but you have to take out the existing code for file_2 and file_3 or it will continue to output. Replace
Bob
Yes . . . but you have to take out the existing code for file_2 and file_3 or it will continue to output. Replace
<div class="cfclear"><br />File 1: {file_1}<br />File 2: {file_2}<br />File 3: {file_3}</div>
with<div class="cfclear"><br />File 1: {file_1}</div>
Bob
Awesome, it's working perfectly now. I can't believe I overlooked that 🤣
Thanks a lot for the help Bob.
Thanks a lot for the help Bob.
I need desperate help as well.
I have a client who also wants to hide unfilled fields in email.
http://robinaremovals.com.au/index.php?option=com_chronocontact&Itemid=55
Here is the email template posted below:
I have a client who also wants to hide unfilled fields in email.
http://robinaremovals.com.au/index.php?option=com_chronocontact&Itemid=55
Here is the email template posted below:
<p><img src="images/stories/header1.jpg" border="0" alt="HEADING" title="HEADER" width="707" height="135" /></p>
<h1>Your Details</h1>
<p><br />Name<br />{text_1}<br />Home Phone<br />{text_2}<br />Work Phone<br />{text_4}<br />Mobile<br />{text_5}<br />Email Address<br />{text_3}</p>
<h1>Removal Details</h1>
<p>Delivery Date<br />{text_7}<br />Pick Up Date<br />{text_9}</p>
<p>Packing Material Required<br />{radio0}</p>
<p>Storage Required<br />{radio1}</p>
<p>Number of Weeks Required for Storage<br />{text_10}</p>
<h1>Pick Up Address</h1>
<p>Floor level: eg 1st Floor<br />{text_400}<br />Unit No:<br />{text_401}<br />Address<br />{text_402}<br />Suburb/town<br />{text_403}<br />State<br />{text_404}<br />Postcode<br />{text_405}</p>
<h1>Delivery Address</h1>
<p>Floor level: eg 1st Floor<br />{text_23}<br />Unit No:<br />{text_27}<br />Address<br />{text_24}<br />Suburb/town<br />{text_28}<br />State<br />{text_26}<br />Postcode<br />{text_25}</p>
<h1>Inventory<br /></h1>
<h2>Bedroom 1</h2>
<p>King bed<br />{text_45}<br />Queen bed<br />{text_44}<br />Double bed<br />{text_43}<br />Single bed<br />{text_42}<br />Bedside table<br />{text_41}<br />Chair<br />{text_40}<br />Bookcase<br />{text_39}<br />Cupboard<br />{text_410}<br />Chest of drawers<br />{text_38}<br />Dressing table<br />{text_37}<br />Settee<br />{text_36}<br />Television<br />{text_35}<br />Wardrobe<br />{text_34}<br />Cartons sml<br />{text_33}<br />Cartons lge<br />{text_32}<br />Computer<br />{text_22}<br />Cot<br />{text_47}</p>
<h2>Bedroom 2</h2>
<p>King bed<br />{text_50}<br />Queen bed<br />{text_61}<br />Double bed<br />{text_63}<br />Single bed<br />{text_56}<br />Bedside table<br />{text_64}<br />Chair<br />{text_62}<br />Bookcase<br />{text_60}<br />Cupboard<br />{text_59}<br />Chest of drawers<br />{text_51}<br />Dressing table<br />{text_58}<br />Settee<br />{text_55}<br />Television<br />{text_57}<br />Wardrobe<br />{text_52}<br />Cartons sml<br />{text_54}<br />Cartons lge<br />{text_53}<br />Computer<br />{text_49}<br />Cot<br />{text_48}</p>
<h2>Bedroom 3</h2>
<p>King bed<br />{text_79}<br />Queen bed<br />{text_81}<br />Double bed<br />{text_82}<br />Single bed<br />{text_77}<br />Bedside table<br />{text_80}<br />Chair<br />{text_78}<br />Bookcase<br />{text_71}<br />Cupboard<br />{text_75}<br />Chest of drawers<br />{text_76}<br />Dressing table<br />{text_74}<br />Settee<br />{text_73}<br />Television<br />{text_72}<br />Wardrobe<br />{text_68}<br />Cartons sml<br />{text_69}<br />Cartons lge<br />{text_70}<br />Computer<br />{text_67}<br />Cot<br />{text_66}</p>
<h2>Bedroom 4</h2>
<p>King bed<br />{text_85}<br />Queen bed<br />{text_99}<br />Double bed<br />{text_100}<br />Single bed<br />{text_86}<br />Bedside table<br />{text_98}<br />Chair<br />{text_96}<br />Bookcase<br />{text_95}<br />Cupboard<br />{text_97}<br />Chest of drawers<br />{text_94}<br />Dressing table<br />{text_93}<br />Settee<br />{text_92}<br />Television<br />{text_91}<br />Wardrobe<br />{text_90}<br />Cartons sml<br />{text_88}<br />Cartons lge<br />{text_89}<br />Computer<br />{text_87}<br />Cot<br />{text_84}</p>
<h2>Bedroom 5</h2>
<p>King bed<br />{text_102}<br />Queen bed<br />{text_117}<br />Double bed<br />{text_113}<br />Single bed<br />{text_114}<br />Bedside table<br />{text_116}<br />Chair<br />{text_115}<br />Bookcase<br />{text_112}<br />Cupboard<br />{text_103}<br />Chest of drawers<br />{text_109}<br />Dressing table<br />{text_111}<br />Settee<br />{text_110}<br />Television<br />{text_105}<br />Wardrobe<br />{text_108}<br />Cartons sml<br />{text_104}<br />Cartons lge<br />{text_107}<br />Computer<br />{text_143}<br />Cot<br />{text_106}</p>
<h2>Lounge</h2>
<p>Single Armchair<br />{text_140}<br />3 Seater Lounge<br />{text_141}<br />2 Seater Lounge<br />{text_139}<br />Bookcase<br />{text_138}<br />Bureau<br />{text_137}<br />China cabinet<br />{text_135}<br />Coffee table<br />{text_136}<br />Desk<br />{text_134}<br />Entertainment unit<br />{text_133}<br />Occasional table<br />{text_132}<br />Other chairs<br />{text_131}<br />Cartons sml<br />{text_127}<br />Cartons lge<br />{text_130}<br />Grand Piano<br />{text_129}<br />Upright Piano<br />{text_128}<br />Organ<br />{text_126}<br />Rug<br />{text_125}<br />Speakers<br />{text_124}<br />Television sml<br />{text_121}<br />Television med<br />{text_123}<br />Video<br />{text_122}<br />Video cabinet<br />{text_120}<br />Wall unit<br />{text_119}</p>
<h2>Family room</h2>
<p>Single Armchair<br />{text_158}<br />2 Seater Lounge<br />{text_159}<br />3 Seater Lounge<br />{text_157}<br />Bookcase<br />{text_156}<br />Chair<br />{text_155}<br />Entertainment unit<br />{text_154}<br />Coffee table<br />{text_153}<br />Pool table<br />{text_152}<br />Settee<br />{text_151}<br />Stereo<br />{text_150}<br />Television<br />{text_147}<br />Video cabinet<br />{text_149}<br />Wall unit<br />{text_148}<br />Computer<br />{text_145}<br />Cartons sml<br />{text_146}<br />Cartons lge<br />{text_144}</p>
<h2>Dining room</h2>
<p>Bookcase<br />{text_163}<br />Buffet/sideboard<br />{text_167}<br />Dining chairs<br />{text_170}<br />Cabinet/wall<br />{text_169}<br />Dresser<br />{text_168}<br />Other chairs<br />{text_166}<br />Table<br />{text_164}<br />Cartons sml<br />{text_162}<br />Cartons lge<br />{text_161}</p>
<h2>Hall</h2>
<p>Bench<br />{text_179}<br />Bookcase<br />{text_180}<br />Hall stand<br />{text_178}<br />Hall table<br />{text_177}<br />Hat stand<br />{text_176}<br />Pedestal<br />{text_173}<br />Phone table<br />{text_175}<br />Cartons sml<br />{text_174}<br />Cartons lge<br />{text_172}</p>
<h2>Study</h2>
<p>Bookcase<br />{text_184}<br />Chair<br />{text_188}<br />Computer<br />{text_189}<br />Desk<br />{text_186}<br />Filing cabinet<br />{text_187}<br />Wall unit<br />{text_185}<br />Cartons sml<br />{text_183}<br />Cartons lge<br />{text_182}</p>
<h2>Kitchen</h2>
<p>Cabinet<br />{text_205}<br />Chair<br />{text_192}<br />Dishwasher<br />{text_204}<br />Dresser<br />{text_203}<br />Large Freezer<br />{text_202}<br />Small Freezer<br />{text_200}<br />Cartons sml<br />{text_199}<br />Cartons lge<br />{text_201}<br />Microwave<br />{text_198}<br />Double Door Fridge<br />{text_197}<br />Large Fridge<br />{text_195}<br />Bar Fridge<br />{text_196}<br />Stool<br />{text_194}<br />Large Table<br />{text_193}<br />Medium Table<br />{text_191}</p>
<h2>Laundry</h2>
<p>Clothes dryer<br />{text_213}<br />Cupboard<br />{text_214}<br />Freezer<br />{text_215}<br />Ironing board<br />{text_210}<br />Linen basket<br />{text_211}<br />Table<br />{text_212}<br />Washing machine<br />{text_209}<br />Cartons sml<br />{text_208}<br />Cartons lge<br />{text_207}</p>
<h2>Outside/Misc.</h2>
<p>Barbeque Small<br />{text_231}<br />Barbeque Large<br />{text_234}<br />Bicycle<br />{text_236}<br />Dog kennel<br />{text_232}<br />Outdoor bench large<br />{text_233}<br />Outdoor bench sml<br />{text_235}<br />Outdoor table<br />{text_218}<br />Outdoor chair<br />{text_228}<br />Lawn mower<br />{text_230}<br />Fridge<br />{text_229}<br />Swing dismantled<br />{text_227}<br />Table<br />{text_225}<br />Trampoline<br />{text_226}<br />Trunk/tool box<br />{text_224}<br />Cupboard<br />{text_223}<br />Wheel barrow<br />{text_222}<br />Work bench<br />{text_219}<br />Cartons sml<br />{text_221}<br />Cartons lge<br />{text_220}<br />Plants<br />{text_217}</p>
<p> </p>
<h2>Please indicate any further information in the field below:</h2>
<p><br />{text_240}</p>
{text_240}
blayden,
Looks to me as though the code that you need is already in this thread?
Bob
Looks to me as though the code that you need is already in this thread?
Bob
I have tried all the codes that you have put in the thread with no success. Can you show me where to add it exactly please.
I would really appreciate it. My customer needs it asap.
Thanks
I would really appreciate it. My customer needs it asap.
Thanks
Hi mikeblayden,
What **exactly** do you need?
If you want to hide the {xxx} values then you need to ensure that xxx has a value set in the $_POST array - an empty value is fine, no value at all is not.
If you want to hide whole chunks of the template then you need to write conditional PHP into the template to check the results and display the chunks that you need.
Bob
What **exactly** do you need?
If you want to hide the {xxx} values then you need to ensure that xxx has a value set in the $_POST array - an empty value is fine, no value at all is not.
If you want to hide whole chunks of the template then you need to write conditional PHP into the template to check the results and display the chunks that you need.
Bob
Hi Greyhead,
I have a customer who needs to have a email sent to him with just the info his clients have put in. At the moment his full email is 5 pages. They need only the info the customer has put in so if it is 1 page worth, they don't want the empty questions to be included. He has another site with another product which does this easily. I just want chronoform to do it the same. I do not know php code and so I just would like to know how to do it step by step.
I hope this helps
I have a customer who needs to have a email sent to him with just the info his clients have put in. At the moment his full email is 5 pages. They need only the info the customer has put in so if it is 1 page worth, they don't want the empty questions to be included. He has another site with another product which does this easily. I just want chronoform to do it the same. I do not know php code and so I just would like to know how to do it step by step.
I hope this helps
Hi,
I have the exact same issue as mikeblayden. My client doesn't want to receive an email that is a few pages long and has all the form questions listed when the answered fields may be less than a page worth of information. We need to hide the fields that have not been answered when the email is sent to the form administrator. I am not a php coder but am able to alter any code if it is explained clearly. Please help asap. Thanks
I have the exact same issue as mikeblayden. My client doesn't want to receive an email that is a few pages long and has all the form questions listed when the answered fields may be less than a page worth of information. We need to hide the fields that have not been answered when the email is sent to the form administrator. I am not a php coder but am able to alter any code if it is explained clearly. Please help asap. Thanks
Hi melanin and mikeblayden,
I'm sorry but there isn't a better answer than you've already had.
If you want to conditionally skip chunks of the email template then you need to add the PHP to check the conditions and show or not show the corresponding part of the template.
The default template that ChronoForms creates is more or less a copy of your form. You can edit it as much as you like to change the layout.
To use PHP in the template you will need to turn of the HTML editor in the Email Setup Properties box.
Bob
I'm sorry but there isn't a better answer than you've already had.
If you want to conditionally skip chunks of the email template then you need to add the PHP to check the conditions and show or not show the corresponding part of the template.
The default template that ChronoForms creates is more or less a copy of your form. You can edit it as much as you like to change the layout.
To use PHP in the template you will need to turn of the HTML editor in the Email Setup Properties box.
Bob
Thanks for the speedy reply Bob. Unfortunately writing the code is beyond my capabilities right now and time is against me. Would you be interessted in assisting us to sort this out for a fee? I need a cost and time frame so I can pass it by my client. Do you know anyoe else who can help if you are unable to?
Ta
Ta
Hi melanin,
I can't take this on at the moment but we are trying to develop a relationship with a group of developers who can provide a professional support service for ChronoForms users. I've passed a link to this thread to them and hopefully they will get back to you.
I say hopefully as so far they have not always been the fastest responders.
Bob
I can't take this on at the moment but we are trying to develop a relationship with a group of developers who can provide a professional support service for ChronoForms users. I've passed a link to this thread to them and hopefully they will get back to you.
I say hopefully as so far they have not always been the fastest responders.
Bob
Hi Bob,
Thanks. I hope they get in touch very soon. In the meantime I guess I will try and search for some php people to help us. If you do have the time to do the code snippets and a step by step that would be much appreciated 8) It would be a useful feature to have in the next release of Chronoforms though :wink: .
Thanks. I hope they get in touch very soon. In the meantime I guess I will try and search for some php people to help us. If you do have the time to do the code snippets and a step by step that would be much appreciated 8) It would be a useful feature to have in the next release of Chronoforms though :wink: .
Hi Melanin,
Are you still i need of assistance with your project?
If so, we would like to assist you.
Best regards,
Van
Are you still i need of assistance with your project?
If so, we would like to assist you.
Best regards,
Van
Hi Bob,
I went with chronoforms as it was a subscription based paid form, thinking I would get better customer service. This has not been the case. I should of went with CK Forms as they are free and in their forums they take this post and answer it. STEP BY STEP in simple terms instead of suggesting I pay more money for a developer to write it for me. I am very dissapointed!!!
Below is what they have answered:
To:
This removes empty fields (such as horizontal rule lines) from the message you receive and additionally, should a field label be blank for any reason, replaces the blank field label to the field name.
You'll also want to change line 561 or 569 (depending if you've already made the previous change). This will apply the fix to email receipts users would receive.
If this is a paid component why is a free form like CK Forms answering their customers more effectively??????
Mike
I went with chronoforms as it was a subscription based paid form, thinking I would get better customer service. This has not been the case. I should of went with CK Forms as they are free and in their forums they take this post and answer it. STEP BY STEP in simple terms instead of suggesting I pay more money for a developer to write it for me. I am very dissapointed!!!
Below is what they have answered:
Re: Skipping empty fields in form mail
Postby clwheatley » Tue Apr 20, 2010 7:41 pm
I've had this problem ever since I started using CKForms 1.2.0. The solution I found is fairly simple and requires editing of /components/com_ckforms/models/ckforms.php. Note, you should back up the original before making any changes just to be safe.
This file has changed with practically each new revision since 1.2.0, but for version 1.3.4_b2 change line 457 from:
$mailBody = $mailBody.$field->label . " : " . $fieldValue . "<br />\n";
To:
if ($fieldValue != "") {
if (!is_null($field->label)) {
$mailBody = $mailBody.$field->label . " : " . $fieldValue . "<br />\n";
}
else {
$mailBody = $mailBody.$field->name . " : " . $fieldValue . "<br />\n";
}
}
This removes empty fields (such as horizontal rule lines) from the message you receive and additionally, should a field label be blank for any reason, replaces the blank field label to the field name.
You'll also want to change line 561 or 569 (depending if you've already made the previous change). This will apply the fix to email receipts users would receive.
If this is a paid component why is a free form like CK Forms answering their customers more effectively??????
Mike
Hi mikeblayden,
I'm delighted that you've got what you needed from CK forms.
Just to be clear, your license fee here goes to Max - the developer, not to me.
I tend not to recommend hacking core code as experience says that the hack gets forgotten and then over-written in a future upgrade. But it can still be useful.
There are also some pretty clear instructions in this thread as far as I recall but they do require more work on your part to implement them. That's one of the side consequences of the different ways in which ChronoForms and CJ forms are built.
Bob
I'm delighted that you've got what you needed from CK forms.
Just to be clear, your license fee here goes to Max - the developer, not to me.
I tend not to recommend hacking core code as experience says that the hack gets forgotten and then over-written in a future upgrade. But it can still be useful.
There are also some pretty clear instructions in this thread as far as I recall but they do require more work on your part to implement them. That's one of the side consequences of the different ways in which ChronoForms and CJ forms are built.
Bob
Hi movietei,
What problem do you have that the answers in this thread don't address?
The only problem left seems to be the need for some time and coding experience to get the desired result.
Bob
What problem do you have that the answers in this thread don't address?
The only problem left seems to be the need for some time and coding experience to get the desired result.
Bob
Hi Bob and Max
As always - am amazed at your output 🙂
Further to this issue, I am one of the fortunate few that can use the "name" element beside EVERY input field (other than NAME, EMAIL, etc) to hide all entries that are not ticked.
Though I have a question relating to the Email I am receiving...
Each entry (in the response email) is followed by a comma, and then the next entry neatly follows until all the input fields ticked are displayed.
My question... WHERE (or how) can I change the comma to a break - <br /> so that each entry sits one beneath the other, rather than following in a sentence.
Example: (existing)
• melb_LEDbasic_7thJuly, • melb_LEDadvanced_8thJuly, • melb_EVSavidFCP_4thAug
(desired)
• melb_LEDbasic_7thJuly,
• melb_LEDadvanced_8thJuly,
• melb_EVSavidFCP_4thAug
Thanks in advance, Simon
As always - am amazed at your output 🙂
Further to this issue, I am one of the fortunate few that can use the "name" element beside EVERY input field (other than NAME, EMAIL, etc) to hide all entries that are not ticked.
Though I have a question relating to the Email I am receiving...
Each entry (in the response email) is followed by a comma, and then the next entry neatly follows until all the input fields ticked are displayed.
My question... WHERE (or how) can I change the comma to a break - <br /> so that each entry sits one beneath the other, rather than following in a sentence.
Example: (existing)
• melb_LEDbasic_7thJuly, • melb_LEDadvanced_8thJuly, • melb_EVSavidFCP_4thAug
(desired)
• melb_LEDbasic_7thJuly,
• melb_LEDadvanced_8thJuly,
• melb_EVSavidFCP_4thAug
Thanks in advance, Simon
Hello Bob,
Thank you for your previous help and for the great assistance you are giving everybody.
I found this topic and have the same requirements as some of the previous users.
I am using Chrono Forms v 3.2, with Joomla 1.5.22.
In the 'setup email' tab I have set all the properties to 'text only'.
Then in the Emails Template in the HTML editor I copied following code:
After I click update I get - what I think is wrong:
Obviously this does not work, but I do not know why? Also what might be a problem - I assume - basically the text fields have no values in them, so if the customer does not give a value e.g. 0,1,2,3 then I am not sure if to form would default that to zero or not.
Sorry for the newbie questions.
Thanks in advance,
Siki
Thank you for your previous help and for the great assistance you are giving everybody.
I found this topic and have the same requirements as some of the previous users.
I am using Chrono Forms v 3.2, with Joomla 1.5.22.
In the 'setup email' tab I have set all the properties to 'text only'.
Then in the Emails Template in the HTML editor I copied following code:
<?php
if ( $_POST['sweet_chilli'] > 0 ){
echo "Sweet Chilli: ".$_POST['sweet_chilli']."<br />";
}
if ( $_POST['ham'] > 0 ){
echo "Ham: ".$_POST['ham']."<br />";
}
?>
After I click update I get - what I think is wrong:
0 ){ echo "Sweet Chilli: ".$_POST['sweet_chilli']."
"; } if ( $_POST['ham'] > 0 ){ echo "Ham: ".$_POST['ham']."
"; } ?>
Obviously this does not work, but I do not know why? Also what might be a problem - I assume - basically the text fields have no values in them, so if the customer does not give a value e.g. 0,1,2,3 then I am not sure if to form would default that to zero or not.
Sorry for the newbie questions.
Thanks in advance,
Siki
Hi Bob,
Was the previous post addressed to my questions or Andre's ? 😲
Thanks,
siki
Was the previous post addressed to my questions or Andre's ? 😲
Thanks,
siki
Hi siki,
Errr . . . you I guess ( I can’t see a post by Andre so I must have made that up, apologies).
Bob
Errr . . . you I guess ( I can’t see a post by Andre so I must have made that up, apologies).
Bob
I think what siki1982 is getting at is that the editor even in html mode deletes the PHP tags.
I have this same problem.
I have this same problem.
Hi,
Has anything been done about this issue with the latest updates perhaps?
I recently installed chronoforms because I need to build a form for my joomla site but do not know the first thing about html,css and php coding.
I am trying to build a form that would look very similar to this -> <!-- w --><a class="postlink" href="http://www.madeira-seekers.com/Madeira-SeekersBookingForm2.html">www.madeira-seekers.com/Madeira-Seekers ... Form2.html</a><!-- w -->. As you can see its a lengthy form with a lot of fields being repeated.
Chronoforms does not seem to have the ability to send an email where only the fields that have been selected, ticked or filled out will be sent. In a form like the one I am trying to copy, it will not suppress the fields that are blank or that have a zero value. So if a person only picks 1 of the 2-300 options available, you will still be sent a cumbersome email with empty or zero fields showing, leaving you trying to sift through the info trying to find the relevant data.
Am I right, or have I hopefully overlooked something?
Has anything been done about this issue with the latest updates perhaps?
I recently installed chronoforms because I need to build a form for my joomla site but do not know the first thing about html,css and php coding.
I am trying to build a form that would look very similar to this -> <!-- w --><a class="postlink" href="http://www.madeira-seekers.com/Madeira-SeekersBookingForm2.html">www.madeira-seekers.com/Madeira-Seekers ... Form2.html</a><!-- w -->. As you can see its a lengthy form with a lot of fields being repeated.
Chronoforms does not seem to have the ability to send an email where only the fields that have been selected, ticked or filled out will be sent. In a form like the one I am trying to copy, it will not suppress the fields that are blank or that have a zero value. So if a person only picks 1 of the 2-300 options available, you will still be sent a cumbersome email with empty or zero fields showing, leaving you trying to sift through the info trying to find the relevant data.
Am I right, or have I hopefully overlooked something?
Hi Taks,
There isn't a ChronoForms issue here - more a designer issue :-(
ChronoForms has no way of knowing what your form inputs mean so it can't take decisions about what to hide or show.
I'd suggest that you break your form up into steps, have the first step choose one or more activities, then have an extra step to be completed for each selected activity.
Bob
There isn't a ChronoForms issue here - more a designer issue :-(
ChronoForms has no way of knowing what your form inputs mean so it can't take decisions about what to hide or show.
I'd suggest that you break your form up into steps, have the first step choose one or more activities, then have an extra step to be completed for each selected activity.
Bob
Hi Bob,
Thx for the reply. Hopefully the designers will listen to the many requests for this and change design. Dont know much about code, but I imagine that it must be possible that if a field has a zero value then it gets ignored. But like I said I'm definitely no expert.
With regards to your suggestion, that sounds like it could be a solution, but not sure how to put it into practice. I could create 10 separate forms, and make one for a person to choose which ones are relevant to their needs. How though, would I get all those forms that a person chose to show on one page? I have thus far, managed to build http://www.hermanus-seekers.com without any coding knowledge what so ever, but admittedly am stumped at this point.
Another issue with the form I'm building is the number of field elements that will be repeated (each element could be repeated aprox 30 times). It doesn't seem like you can, in wizard mode, repeat certain sections of your form. So if I want to copy the last ten elements and their settings, to be repeated again, its not possible. I can go into the code and just copy and paste, but then I lose the inability to go back to the wizard without undoing everything that I did in code. That means that I would never again be able to edit that form in wizard mode without undoing everything I have done in code. Very limiting for a company whose numerous products change continuously.
Possibly I am asking too much from a form builder, but it seems like many people are asking for these features. Something for the designers to work towards maybe?
Taks
Thx for the reply. Hopefully the designers will listen to the many requests for this and change design. Dont know much about code, but I imagine that it must be possible that if a field has a zero value then it gets ignored. But like I said I'm definitely no expert.
With regards to your suggestion, that sounds like it could be a solution, but not sure how to put it into practice. I could create 10 separate forms, and make one for a person to choose which ones are relevant to their needs. How though, would I get all those forms that a person chose to show on one page? I have thus far, managed to build http://www.hermanus-seekers.com without any coding knowledge what so ever, but admittedly am stumped at this point.
Another issue with the form I'm building is the number of field elements that will be repeated (each element could be repeated aprox 30 times). It doesn't seem like you can, in wizard mode, repeat certain sections of your form. So if I want to copy the last ten elements and their settings, to be repeated again, its not possible. I can go into the code and just copy and paste, but then I lose the inability to go back to the wizard without undoing everything that I did in code. That means that I would never again be able to edit that form in wizard mode without undoing everything I have done in code. Very limiting for a company whose numerous products change continuously.
Possibly I am asking too much from a form builder, but it seems like many people are asking for these features. Something for the designers to work towards maybe?
Taks
Hi Taks,
All of your questions are fairly easy to resolve using Custom code in one way or another. You may need to get help from a coder to build your forms.
Bob
All of your questions are fairly easy to resolve using Custom code in one way or another. You may need to get help from a coder to build your forms.
Bob
Hi Bob,
Decided to go on with building that lengthy form after all.
I am trying to get around not being able to repeat certain sections of the form by building 7 or 8 different forms. These are like templates. I then take my last form with the submit button and change it to a custom form and add to its code by copying and pasting all of the other forms coding to it. This way if i have to repeat certain forms, I just copy and paste it into the last forms coding where I want it. I then go back to wizard in custom mode and update the email template. That's the theory anyhow.
So I experimented with two forms. It partly worked. Two problems so far. Firstly, when a mail is sent from the website, the thank you message includes a long page of Data Array,Validation Errors, and Debug Data.
Second problem is that, even though all field label text is shown, some fields are left blank in the emails received. I copied this from the email:
First Name*Taki
Last Name*
Country
Email*
Telephone*+27283164588
Even though Last name and Email are required fields and were filled out, and yes it does prompt you to fill them in, they do not show in the email. First Name also a required field was shown. As a singular form, all field's info is included, but not when I join the two forms together by copying and pasting code. Possible problem is when I go back to wizard to update template, although it does update to show all the forms.
Any ideas what the problem could be?
Decided to go on with building that lengthy form after all.
I am trying to get around not being able to repeat certain sections of the form by building 7 or 8 different forms. These are like templates. I then take my last form with the submit button and change it to a custom form and add to its code by copying and pasting all of the other forms coding to it. This way if i have to repeat certain forms, I just copy and paste it into the last forms coding where I want it. I then go back to wizard in custom mode and update the email template. That's the theory anyhow.
So I experimented with two forms. It partly worked. Two problems so far. Firstly, when a mail is sent from the website, the thank you message includes a long page of Data Array,Validation Errors, and Debug Data.
Second problem is that, even though all field label text is shown, some fields are left blank in the emails received. I copied this from the email:
First Name*Taki
Last Name*
Country
Email*
Telephone*+27283164588
Even though Last name and Email are required fields and were filled out, and yes it does prompt you to fill them in, they do not show in the email. First Name also a required field was shown. As a singular form, all field's info is included, but not when I join the two forms together by copying and pasting code. Possible problem is when I go back to wizard to update template, although it does update to show all the forms.
Any ideas what the problem could be?
Hi again Ben,
So after hours of trying to find answers, Your final answer on this thread (http://www.chronoengine.com/forums/index.php?option=com_chronoforums&cont=posts&f=2&t=82363) answered the array data problem.
The problem with certain fields not showing was because I was using the auto generated Field Name when configuring an element in wizard mode.
Then when copying the code from another form into the new form, multiple fields had the same name.
These were not showing on an email.
All sorted thx.
Taks
So after hours of trying to find answers, Your final answer on this thread (http://www.chronoengine.com/forums/index.php?option=com_chronoforums&cont=posts&f=2&t=82363) answered the array data problem.
The problem with certain fields not showing was because I was using the auto generated Field Name when configuring an element in wizard mode.
Then when copying the code from another form into the new form, multiple fields had the same name.
These were not showing on an email.
All sorted thx.
Taks
Hi Taks,
Well done.
Bob
It's worth checking the FAQs for problems like these. The first one is covered there, though the second isn't.
Well done.
Bob
It's worth checking the FAQs for problems like these. The first one is covered there, though the second isn't.
Hi,
So I was 9/10 way finished with that lengthy
form, when all of a sudden I cant access the form any longer in Wizard.
Actually the wizard seems broken.
The last thing I did was save the form and when it went back into wizard, it wouldn't load the wizard properly any longer. A whole lot of features are missing and the already completed fields aren't showing any more. Also you cant drag and drop any longer.
The form itself still looks and work fine in front end and the coding is still in tact, but the wizard in back end seems broken.
All the other forms saved on my chronoforms, are working just fine, but the main form doesn't work any longer. Another hour or so and the form would have been done.😟
Taks
So I was 9/10 way finished with that lengthy
form, when all of a sudden I cant access the form any longer in Wizard.
Actually the wizard seems broken.
The last thing I did was save the form and when it went back into wizard, it wouldn't load the wizard properly any longer. A whole lot of features are missing and the already completed fields aren't showing any more. Also you cant drag and drop any longer.
The form itself still looks and work fine in front end and the coding is still in tact, but the wizard in back end seems broken.
All the other forms saved on my chronoforms, are working just fine, but the main form doesn't work any longer. Another hour or so and the form would have been done.😟
Taks
Hi bob,
Thx for the reply.
The form saved the last thing I did perfectly and then goes back into the wizard, but its a real strange looking and incomplete version of the wizard that all my other forms on the same website, that are on the same server, display.
If you use the superadmin log in details i sent you in a private message on Friday, you will see what I am referring to.
Thx for the reply.
The form saved the last thing I did perfectly and then goes back into the wizard, but its a real strange looking and incomplete version of the wizard that all my other forms on the same website, that are on the same server, display.
If you use the superadmin log in details i sent you in a private message on Friday, you will see what I am referring to.
Hi Taks,
I had a look but don't see any PM or email from you last Friday? Could be I'm looking in the wrong place or day.
Bob
I had a look but don't see any PM or email from you last Friday? Could be I'm looking in the wrong place or day.
Bob
Hi Bob,
That's strange. I sent you another PM about 30mins ago.
Let me know if you don't get it.
Btw, do you think this thread should be renamed to every question you ever had about chronoforms?
Taks
That's strange. I sent you another PM about 30mins ago.
Let me know if you don't get it.
Btw, do you think this thread should be renamed to every question you ever had about chronoforms?
Taks
Hi Taks,
No PM here - maybe you sent it to 'Admin', that's Max. There's a PM link under my picture here.
Bob
No PM here - maybe you sent it to 'Admin', that's Max. There's a PM link under my picture here.
Bob
Hi,
I know and when I hover over it it says email Greyhead.
I just try'd for a third time.
Taks
I know and when I hover over it it says email Greyhead.
I just try'd for a third time.
Taks
Hi Taks,
No PM here - maybe you sent it to 'Admin', that's Max. There's a PM link under my picture here.
Bob
Hi Taks,
Got it thank you.
I think that there are two problems here. One is that the form is very big and I'd be inclined to break it into several linked smaller forms.
I tried a backup copy of the form on my site and I get a time-out message saying that processing has exceeded the 30 second limit on the server.
The second is that you have some Header elements in the form with Double quotes in them like this:
You don't need to style like this. Use a Header tag like <h2>; or a <div> and add the style with CSS; or just use single quotes if you have not other solution.
Bob
Got it thank you.
I think that there are two problems here. One is that the form is very big and I'd be inclined to break it into several linked smaller forms.
I tried a backup copy of the form on my site and I get a time-out message saying that processing has exceeded the 30 second limit on the server.
The second is that you have some Header elements in the form with Double quotes in them like this:
<p style="text-align: center;"><span style="font-size: xx-large; color: #000000;"><strong>HOTEL PROMOTION</strong></span></p>
These quotes do seem to cause problems in he Header element (the Custom Element element is OK).You don't need to style like this. Use a Header tag like <h2>; or a <div> and add the style with CSS; or just use single quotes if you have not other solution.
<div style='text-align: center; font-size: xx-large; color: #000000; font-weight:bold;' >HOTEL PROMOTION</div>
Bob
Hi Bob,
Ok so the reason why i didn't go with severally linked forms in the end is because of my former problem with the auto generated field names having to be changed, but mainly because when you generate a template, it comes out untidy and hard to read in emails.
The header text is just something I cut straight out of the tiny editor after having first written it in text and then converted it to html via the text editor itself. Like i said, I don't know how to write code.
So is there anyway to retrieve this form so that I can finish it?
The Headers were saving and looking fine up until the final time I saved then form then all of a sudden nothing.
I think the problem might be more to do with the fact that the form has become too big. Athough I upped max_input and max_output times in php.ini, it hasn't helped.
Taks
Ok so the reason why i didn't go with severally linked forms in the end is because of my former problem with the auto generated field names having to be changed, but mainly because when you generate a template, it comes out untidy and hard to read in emails.
The header text is just something I cut straight out of the tiny editor after having first written it in text and then converted it to html via the text editor itself. Like i said, I don't know how to write code.
So is there anyway to retrieve this form so that I can finish it?
The Headers were saving and looking fine up until the final time I saved then form then all of a sudden nothing.
I think the problem might be more to do with the fact that the form has become too big. Athough I upped max_input and max_output times in php.ini, it hasn't helped.
Taks
Hi Taks,
I'm off on holiday in a couple of hours. You can edit the form record directly in PHPMyAdmin to change the code but you will probably need help to do this from someone with some coding experience. If you get stuck please ask Max if he can help using the Contact Us link above.
Bob
I'm off on holiday in a couple of hours. You can edit the form record directly in PHPMyAdmin to change the code but you will probably need help to do this from someone with some coding experience. If you get stuck please ask Max if he can help using the Contact Us link above.
Bob
Thx Bob,
Enjoy what I imagine must be a well deserved holiday.
I hope I wasn't a contributing factor. 🙂
Taks
Enjoy what I imagine must be a well deserved holiday.
I hope I wasn't a contributing factor. 🙂
Taks
Hi Bob,
I have a big problem. Out of the blue I get a booking and the customer
details that requires validation are not included. The email looked like
this:
Pick Shark Tour: Gansbaai Full Day 10am
Number of Adults 2
Number of children
Children´s Age:
Tour Date 2012-12-19
First Name*
Last Name*
Country
Email*
Telephone*
Mobile*
If you check out my form here:
http://cape-town-shark-diving.co.za/Home/cape-town-shark-diving-booking-form.html,
you will see that you can't submit this form without filling out the
required fields. Business at the moment is bad and I only get one ore two
shark bookings a month, so I can't afford for this to happen again in order
to confirm if this is a once off or not. Have you seen this happen before?
I don't see any info in the forums about this.
Regards,
Takis
I have a big problem. Out of the blue I get a booking and the customer
details that requires validation are not included. The email looked like
this:
Pick Shark Tour: Gansbaai Full Day 10am
Number of Adults 2
Number of children
Children´s Age:
Tour Date 2012-12-19
First Name*
Last Name*
Country
Email*
Telephone*
Mobile*
If you check out my form here:
http://cape-town-shark-diving.co.za/Home/cape-town-shark-diving-booking-form.html,
you will see that you can't submit this form without filling out the
required fields. Business at the moment is bad and I only get one ore two
shark bookings a month, so I can't afford for this to happen again in order
to confirm if this is a once off or not. Have you seen this happen before?
I don't see any info in the forums about this.
Regards,
Takis
Hi Taks,
You need to add serverside validation to protect the submitted data. Think of clientside validation as helping the user complete the form. It can be bypassed by turning JavaScript off and so itn's reliable.
If it's any consolation, I very much doubt that was a genuine booking :-(
Bob
You need to add serverside validation to protect the submitted data. Think of clientside validation as helping the user complete the form. It can be bypassed by turning JavaScript off and so itn's reliable.
If it's any consolation, I very much doubt that was a genuine booking :-(
Bob
Hi Bob,
Thx for your reply. How do I go about adding serverside validation, and why do you say you dont think it was a genuine booking?
Warm regards,
Takis
Thx for your reply. How do I go about adding serverside validation, and why do you say you dont think it was a genuine booking?
Warm regards,
Takis
Hi Takis,
You can get basic Serverside validation by dragging in an Auto Serverside Validation action to the On Submit event.
The form with a few random clicks looks more like someone browsing at random; and the failure of the Client Side validation suggests that they had JavaScript disabled which would be unusual for genuine users.
Bob
You can get basic Serverside validation by dragging in an Auto Serverside Validation action to the On Submit event.
The form with a few random clicks looks more like someone browsing at random; and the failure of the Client Side validation suggests that they had JavaScript disabled which would be unusual for genuine users.
Bob
Hi Bob,
Doesn't seem to want to work. I dragged a auto serverside to the on submit event, and added "input_text_18", the name of the required field name for email* into the required section of serverside configuration.
Yet if I turn javascript off I can still send myself a blank email, without any prompt to fill in the email address of this form: http://cape-town-shark-diving.co.za/Home/cape-town-shark-diving-booking-form.html.
Doesn't seem to want to work. I dragged a auto serverside to the on submit event, and added "input_text_18", the name of the required field name for email* into the required section of serverside configuration.
Yet if I turn javascript off I can still send myself a blank email, without any prompt to fill in the email address of this form: http://cape-town-shark-diving.co.za/Home/cape-town-shark-diving-booking-form.html.
Hi Takis,
Please drag an Event Loop action into the pink On Fail event of the Auto Serverside Validation action to handle the errors. The default settings for the Event Loop action should be OK.
Bob
Please drag an Event Loop action into the pink On Fail event of the Auto Serverside Validation action to handle the errors. The default settings for the Event Loop action should be OK.
Bob
Hi Bob,
Ok, I did as you said.
Still nothing, except i don't see a setting that can be set to OK.
The configuration in event loop gives you option in Target event field as On LOad, On submit, On Subit>....>On Success and On submit>....> On Fail.
In the Quit next action field its either a Yes or No.
Takis
Ok, I did as you said.
Still nothing, except i don't see a setting that can be set to OK.
The configuration in event loop gives you option in Target event field as On LOad, On submit, On Subit>....>On Success and On submit>....> On Fail.
In the Quit next action field its either a Yes or No.
Takis
Hi Takis,
Sorry, I just meant that you don't need to change any settings. They should be set to >On Load and Yes
Bob
Sorry, I just meant that you don't need to change any settings. They should be set to >On Load and Yes
Bob
Hi Bob,
Ok it is like that, but has made no difference.
I can still send a blank enquiry with Javascript off..
Takis
Ok it is like that, but has made no difference.
I can still send a blank enquiry with Javascript off..
Takis
Hi Takis,
Do you have the Email action before the Auto Serverside Validation action? That would explain this.
The Validation needs to be before any Email or DB Save actions.
Bob
Do you have the Email action before the Auto Serverside Validation action? That would explain this.
The Validation needs to be before any Email or DB Save actions.
Bob
Hi Bob,
Ok, that makes logical sense. I see how the events actions work.
Sadly though, it has not made any difference. It still allows blank enquiries.
Takis
Ok, that makes logical sense. I see how the events actions work.
Sadly though, it has not made any difference. It still allows blank enquiries.
Takis
Hi Takis,
By all means email or PM me the site URL and a SuperAdmin login and I'll take a quick look.
Bob
By all means email or PM me the site URL and a SuperAdmin login and I'll take a quick look.
Bob
Hi Takis,
Fixed - for some obscure reason 'required' has a different meaning in the AutoServerside Validation action. It just checks that there is a submission from the form - including an empty submission. Use Not Empty validation to check for one that actually has a value - and better use 'email' as well to check for an email address.
Bob
Fixed - for some obscure reason 'required' has a different meaning in the AutoServerside Validation action. It just checks that there is a submission from the form - including an empty submission. Use Not Empty validation to check for one that actually has a value - and better use 'email' as well to check for an email address.
Bob
Thanks a million. Yes I agree, that doesn't make sense.
Ok will do that next time.
Takis
Ok will do that next time.
Takis
Hi Bob,
Same problem again. On another site of mine, <!-- w --><a class="postlink" href="http://www.hermanus-seekers.com">www.hermanus-seekers.com</a><!-- w -->, someone again filled in a booking and did not enter their personal details. So knowing what to do, I added a auto server side validation before the email event in on submit.
I added the field name in Not empty and also in email. I also added a event loop on fail.
I compared what you did side by side with my validation and it reflected perfectly.
Results were different though. When submitting it would not go to thank you page nor would it force me to fill out email, but rather would reload the form but with the url looking like this:
http://hermanus-seekers.com/prices/index.php?option=com_chronoforms&chronoform=Hermanus-TourZ&event=submit, instead of like this: http://hermanus-seekers.com/prices/booking-form-for-hermanus-tours. With javascript on, it would force me to fill in required fields, but would also not go to thank you message but rather to the strange url.
I had to unfortunately remove the validation, in case someone tried to use the booking form, but if you want to go mimic what I did, I will send you a PM with login details. I do think that both these instances were legit bookings. This one was a whale boat tour for 2 adults and 2 kids and they even let me know how old the kids are. I think a lot of people think that if they send you an email through a form, you can see their email address, like in outlook. Maybe there is a browser out there that overrides the clientside validation?
Regards,
Taks
Same problem again. On another site of mine, <!-- w --><a class="postlink" href="http://www.hermanus-seekers.com">www.hermanus-seekers.com</a><!-- w -->, someone again filled in a booking and did not enter their personal details. So knowing what to do, I added a auto server side validation before the email event in on submit.
I added the field name in Not empty and also in email. I also added a event loop on fail.
I compared what you did side by side with my validation and it reflected perfectly.
Results were different though. When submitting it would not go to thank you page nor would it force me to fill out email, but rather would reload the form but with the url looking like this:
http://hermanus-seekers.com/prices/index.php?option=com_chronoforms&chronoform=Hermanus-TourZ&event=submit, instead of like this: http://hermanus-seekers.com/prices/booking-form-for-hermanus-tours. With javascript on, it would force me to fill in required fields, but would also not go to thank you message but rather to the strange url.
I had to unfortunately remove the validation, in case someone tried to use the booking form, but if you want to go mimic what I did, I will send you a PM with login details. I do think that both these instances were legit bookings. This one was a whale boat tour for 2 adults and 2 kids and they even let me know how old the kids are. I think a lot of people think that if they send you an email through a form, you can see their email address, like in outlook. Maybe there is a browser out there that overrides the clientside validation?
Regards,
Taks
Hi Taks,
This is the full URL for the form front-end view
This is is SEF URL created by your site for the page with the form in it.
http://hermanus-seekers.com/prices/booking-form-for-hermanus-tours
You can have he form re-load the SEF URL by setting Use Relative URL to Yes on the form General tab. This is the default setting and should be OK but can cause problems if the SEF URL settings stop the form submitting correctly.
Bob
This is the full URL for the form front-end view
http://hermanus-seekers.com/prices/index.php?option=com_chronoforms&chronoform=Hermanus-TourZ&event=submit
This is is SEF URL created by your site for the page with the form in it.
http://hermanus-seekers.com/prices/booking-form-for-hermanus-tours
You can have he form re-load the SEF URL by setting Use Relative URL to Yes on the form General tab. This is the default setting and should be OK but can cause problems if the SEF URL settings stop the form submitting correctly.
Bob
Hi Bob,
Thanks for your reply. That did not make much of a difference.
The only difference is that after submitting it redirects to this url: http://hermanus-seekers.com/prices/booking-form-for-hermanus-tours?chronoform=Hermanus-TourZ&event=submit when relative url is set to yes, instead of this url: http://hermanus-seekers.com/prices/index.php?option=com_chronoforms&chronoform=Hermanus-TourZ&event=submit when relative url is set to no.
The point is that in neither instances did I receive the email, even if I do fill in info, and also I don't get prompted to fill out the email field if i leave submission empty.
I also don't get redirected to the thank you message, but rather back to the form. Something strange is that in the email field, after submitting, this is what is filled in there:
<script type='text/javascript'> <!-- var prefix = 'ma' + 'il' + 'to'; var path = 'hr' + 'ef' + '='; var addy28776 = 'taki' + '@'; addy28776 = addy28776 + 'hermanus' + '.' + 'co' + '.' + 'za'; document.write('<a ' + path + '\'' + prefix + ':' + addy28776 + '\'>'); document.write(addy28776); document.write('<\/a>'); //-->\n </script><script type='text/javascript'> <!-- document.write('<span style=\'display: none;\'>'); //--> </script>This email address is being protected from spambots. You need JavaScript enabled to view it. <script type='text/javascript'> <!-- document.write('</'); document.write('span>'); //--> </script>.
I get this even with javascript enabled.
For you to see whats going on if you would like to, I have left the serverside validation in the events, but have left the Not Empty and Email as empty for now, to allow people to submit the forms. If you want to go in, just enter {input_text_5} in both those fields and you will see all the problems I am talking about come up.
Thx,
Takis
Thanks for your reply. That did not make much of a difference.
The only difference is that after submitting it redirects to this url: http://hermanus-seekers.com/prices/booking-form-for-hermanus-tours?chronoform=Hermanus-TourZ&event=submit when relative url is set to yes, instead of this url: http://hermanus-seekers.com/prices/index.php?option=com_chronoforms&chronoform=Hermanus-TourZ&event=submit when relative url is set to no.
The point is that in neither instances did I receive the email, even if I do fill in info, and also I don't get prompted to fill out the email field if i leave submission empty.
I also don't get redirected to the thank you message, but rather back to the form. Something strange is that in the email field, after submitting, this is what is filled in there:
<script type='text/javascript'> <!-- var prefix = 'ma' + 'il' + 'to'; var path = 'hr' + 'ef' + '='; var addy28776 = 'taki' + '@'; addy28776 = addy28776 + 'hermanus' + '.' + 'co' + '.' + 'za'; document.write('<a ' + path + '\'' + prefix + ':' + addy28776 + '\'>'); document.write(addy28776); document.write('<\/a>'); //-->\n </script><script type='text/javascript'> <!-- document.write('<span style=\'display: none;\'>'); //--> </script>This email address is being protected from spambots. You need JavaScript enabled to view it. <script type='text/javascript'> <!-- document.write('</'); document.write('span>'); //--> </script>.
I get this even with javascript enabled.
For you to see whats going on if you would like to, I have left the serverside validation in the events, but have left the Not Empty and Email as empty for now, to allow people to submit the forms. If you want to go in, just enter {input_text_5} in both those fields and you will see all the problems I am talking about come up.
Thx,
Takis
Hi Taks,
Please see this FAQ
Please use the Test Form icon in the Forms manager Tool Bar - you can see it when you open the Forms Wizard to edit the form - to try submitting the form and see if it works from there.
Bob
Please see this FAQ
Please use the Test Form icon in the Forms manager Tool Bar - you can see it when you open the Forms Wizard to edit the form - to try submitting the form and see if it works from there.
Bob
HI,
I disabled the email cloaking plugin.
The only difference is that the javascript code is now not inserted into the email field once it has reloaded the form instead of redirecting to the thank you message nor am i receiving any emails even if info has been submitted.
This is the case both on my website and in test form.
Regards,
Takis
I disabled the email cloaking plugin.
The only difference is that the javascript code is now not inserted into the email field once it has reloaded the form instead of redirecting to the thank you message nor am i receiving any emails even if info has been submitted.
This is the case both on my website and in test form.
Regards,
Takis
Hi Takis,
By all means email or PM me the site URL and a SuperAdmin login and I'll take a quick look.
Bob
By all means email or PM me the site URL and a SuperAdmin login and I'll take a quick look.
Bob
Hi Takis,
In the Hermanus-Tourz form there are no settings at all in the Auto Serverside validation action - all the boxes are empty. And there is no From Email Address in the Email #1 action so that probably won't send.
Bob
In the Hermanus-Tourz form there are no settings at all in the Auto Serverside validation action - all the boxes are empty. And there is no From Email Address in the Email #1 action so that probably won't send.
Bob
Hi Bob,
Unfortunately, this is a form that is being used at the moment. Therefore I can't afford to put any settings in because the minute I do the form stops working. It has been working perfectly until now and unless I fill in the serverside validation settings, it still works perfectly, with the exception of that one booking that somehow bypassed the client side validation, which is what I am trying to prevent here.
In order for you to see what I am talking about you will have to enter {input_text_5} in the Not Empty and Email fields of the Serverside settings yourself. I'm sorry, I would leave them there for you but I can't afford someone thinking they sent me an email and me not receiving it. If you would like to give me a time that you will check my settings, I could go in a minute before and put those settings in the Not Empty and Email fields.
Takis
Unfortunately, this is a form that is being used at the moment. Therefore I can't afford to put any settings in because the minute I do the form stops working. It has been working perfectly until now and unless I fill in the serverside validation settings, it still works perfectly, with the exception of that one booking that somehow bypassed the client side validation, which is what I am trying to prevent here.
In order for you to see what I am talking about you will have to enter {input_text_5} in the Not Empty and Email fields of the Serverside settings yourself. I'm sorry, I would leave them there for you but I can't afford someone thinking they sent me an email and me not receiving it. If you would like to give me a time that you will check my settings, I could go in a minute before and put those settings in the Not Empty and Email fields.
Takis
Hi Takis,
I suggest that you make a copy of the form for testing.
You don't need the curly brackets in the Auto Serverside Validation action, just input_text_5 - not quotes or brackets.
Bob
I suggest that you make a copy of the form for testing.
You don't need the curly brackets in the Auto Serverside Validation action, just input_text_5 - not quotes or brackets.
Bob
Hi Bob,
Can you believe it? How stupid of me. It was the curly brackets.
I just copied and pasted from the email template and forgot to remove the brackets.
One last problem though, sorry to be a pain, but if I send a blank email with javascript off, there is no error message at the top of the form that looks like this:
X 1. This field should NOT be empty,
like it does in my <!-- w --><a class="postlink" href="http://www.cape-town-shark-diving.co.za">www.cape-town-shark-diving.co.za</a><!-- w --> form. But If you scroll all the way down to the email field you do see the error message but not on the top of the page and so someone that does not scroll down might mistakenly think that the email was sent.
Any ideas as to why this is not happening?
Takis
(Btw, after all this work I am making you do, I am definitely going to have to validate my chronoforms in the near future. And buy you a beer!)
Can you believe it? How stupid of me. It was the curly brackets.
I just copied and pasted from the email template and forgot to remove the brackets.
One last problem though, sorry to be a pain, but if I send a blank email with javascript off, there is no error message at the top of the form that looks like this:
X 1. This field should NOT be empty,
like it does in my <!-- w --><a class="postlink" href="http://www.cape-town-shark-diving.co.za">www.cape-town-shark-diving.co.za</a><!-- w --> form. But If you scroll all the way down to the email field you do see the error message but not on the top of the page and so someone that does not scroll down might mistakenly think that the email was sent.
Any ideas as to why this is not happening?
Takis
(Btw, after all this work I am making you do, I am definitely going to have to validate my chronoforms in the near future. And buy you a beer!)
Hi Takis,
There's a Show Top Errors option on the form General tab to turn the top errors on and off. Please check the setting.
Bob
There's a Show Top Errors option on the form General tab to turn the top errors on and off. Please check the setting.
Bob
I'm trying to utilize the code to suppress unused fields as outlined in the first three posts of this thread as follows
However, in doing so I'm receiving the following error:
Parse error: syntax error, unexpected '{' in /home/vmlqmzlx/public_html/administrator/components/com_chronoforms/form_actions/email/email.php(52) : eval()'d code on line 89
Can anyone see if I am missing something?
{upload1}
<?php
if ( $_POST['upload2'] > 0 ){
echo "File 2: ".$_POST['upload2']."<br />";
}
if ( $_POST['upload3'] > 0 ){
echo "File 3: ".$_POST['upload3']."<br />";
}
?>
However, in doing so I'm receiving the following error:
Parse error: syntax error, unexpected '{' in /home/vmlqmzlx/public_html/administrator/components/com_chronoforms/form_actions/email/email.php(52) : eval()'d code on line 89
Can anyone see if I am missing something?
This topic is locked and no more replies can be posted.