Forums

Form is not returning (all) submitted data, mostly code

obrowne 04 Dec, 2009
Hello all,
I'm having some problems with getting my forms to work properly! Can anyone help me out with suggestions on how to solve my challange?

The form frontside:
the form can be seen at http://www.cvkh.nl/en/ask-a-question.html (this is the translated version of the original dutch version which can be seen at: http://www.cvkh.nl/nl/stel-een-vraag.html

The situation:
My problem is as follows.... When i fill in the form and submit, all goes wel.
1) the form is submitted, 2)a thank you page is displayed, 3)and the e-mail arrives in the destination mailbox. HOWEVER... The information that is in the delivered e-mail is flawed!
ONLY SOME OF THE SUBMITTED INFORMATION IS DISPLAYED! THE REST IS CODE!
LIKE THIS:
======================
Onderwerp: {Onderwerp}

Aanhef:
Mr
.
Voornaam: {Voornaam}

Achternaam: {Achternaam}

E-mail: [email]info@o-line.nl[/email]

Adres: {Adres}

Postcode: {Postcode}

Plaats: {Plaats}

Telefoon/mobiel: 0

Vraag/Opmerking: Why is this not working? only some fields submit de data that is filled in.

Spam controle: {imageverification}

================================
I'm wondering if this has somthing to do with the fact that i have "commented out" some of the chronoforms (wizard)-generated form code in order to allow my css-styling to work


The implemented form-code is as follows:
=========================================
<fieldset class="contactform"><legend>Contactformulier</legend><br />

<p>
<!--<div class="form_item">-->
<!-- <div class="form_element cf_dropdown">-->
<label>Onderwerp:</label>
<select class="cf_inputbox validate-selection" id="select_1" size="1" title="Selecteer a.u.b. een optie" name="Onderwerp">
<option value="- - - - KIES HIERONDER EEN OPTIE - - - -">- - - - - KIES HIERONDER EEN OPTIE - - - - </option>
<option value="Ik heb een vraag">Ik heb een vraag</option>
<option value="Stuur mij(vrijblijvend!) meer informatie">Stuur mij(vrijblijvend!) meer informatie</option>
</select>
<!--</div>-->
<!--<div class="cfclear"> </div>-->
<!--</div>-->
</p>


<p>
<!--<div class="form_item">-->
<!--<div class="form_element cf_radiobutton">-->
<label>Aanhef:</label>
<!--<div class="float_left">-->
<input value="Dhr." title="Selecteer a.u.b. Dhr. of Mw." class="radio validate-one-required" id="radio00" name="radio0" type="radio" />Dhr.
<!-- <label for="radio00" class="radio_label">Dhr.</label>-->
<!-- <br />-->
<input value="Mw." title="Selecteer a.u.b. Dhr. of Mw." class="radio validate-one-required" id="radio01" name="radio0" type="radio" />Mw.
<!--<label for="radio01" class="radio_label">Mw.</label>-->
<!--<br />-->
<!--</div>-->
</p>


<p>
<!--</div>-->
<!--<div class="cfclear"> </div>-->
<!--</div>-->
<!--<div class="form_item">-->
<!--<div class="form_element cf_textbox">-->
<label>Voornaam:</label>
<input class="cf_inputbox required validate-alpha" maxlength="50" size="36" title="Vul a.u.b. uw voornaam in. (Alleen letters!)" id="text_2" name="Voornaam" type="text" value=""/>
<!-- </div>-->
<!-- <div class="cfclear"> </div>-->
<!--</div>-->
</p>


<p>
<!--<div class="form_item">-->
<!--<div class="form_element cf_textbox">-->
<label>Achternaam:</label>
<input class="cf_inputbox required validate-alpha" maxlength="50" size="36" title="Vul a.u.b. uw achternaam in. (Alleen letters!)" id="text_3" name="Achternaam" type="text" value=""/>
<!-- </div>-->
<!-- <div class="cfclear"> </div>-->
<!--</div>-->
</p>


<p>
<!--<div class="form_item">-->
<!-- <div class="form_element cf_textbox">-->
<label>E-mail:</label>
<input class="cf_inputbox required validate-email" maxlength="50" size="36" title="Vul a.u.b. uw e-mail adres in." id="text_4" name="Email" type="text" value=""/>
<!-- </div>-->
<!-- <div class="cfclear"> </div>-->
<!--</div>-->
</p>


<p>
<!--<div class="form_item">-->
<!-- <div class="form_element cf_textbox">-->
<label>Adres:</label>
<input class="cf_inputbox required validate-alphanum" maxlength="50" size="36" title="Vul a.u.b. uw adres in. (Alleen letters en cijfers!)" id="text_5" name="Adres" type="text" value=""/>
<!-- </div>-->
<!-- <div class="cfclear"> </div>-->
<!--</div>-->
</p>


<p>
<!--<div class="form_item">-->
<!-- <div class="form_element cf_textbox">-->
<label>Postcode:</label>
<input class="cf_inputbox required validate-alphanum" maxlength="50" size="36" title="Vul a.u.b. uw postcode in. (Alleen letters en cijfers!)" id="text_6" name="Postcode" type="text" value=""/>
<!-- </div>-->
<!-- <div class="cfclear"> </div>-->
<!--</div>-->
</p>


<p>
<!--<div class="form_item">-->
<!-- <div class="form_element cf_textbox">-->
<label>Plaats:</label>
<input class="cf_inputbox required validate-alpha" maxlength="50" size="36" title="Vul a.u.b. plaats in. (Alleen letters!)" id="text_7" name="Plaats" type="text" value=""/>
<!-- </div>-->
<!-- <div class="cfclear"> </div>-->
<!--</div>-->
</p>


<p>
<!--<div class="form_item">-->
<!-- <div class="form_element cf_textbox">-->
<label>Telefoon/mobiel:</label>
<input class="cf_inputbox required validate-number" maxlength="50" size="36" title="Vul a.u.b. uw telefoon- of mobiele nummer in. (Alleen cijfers! (wenst u geen nummer op te geven, vul dan een 0 (nul) in)) " id="text_8" name="Telefoon_mobiel" type="text" value=""/>
<!-- </div>-->
<!-- <div class="cfclear"> </div>-->
<!--</div>-->
</p>


<p>
<!--<div class="form_item">-->
<!-- <div class="form_element cf_textarea">-->
<label>Vraag/Opmerking:</label>
<textarea class="cf_inputbox" rows="3" id="text_9" title="" cols="30" name="Vraag_opmerking"></textarea>
<!-- </div>-->
<!-- <div class="cfclear"> </div>-->
<!--</div>-->
</p>

<!--<p> </p>-->

<!--<p><br />-->
<!--<div class="form_item">-->
<!-- <div class="form_element cf_captcha">-->
<!-- <label>Spam controle:</label>-->
<!-- <span>{imageverification}</span> -->
<!-- </div>-->
<!-- <div class="cfclear"> </div>-->
<!--</div>-->
<!--</p>-->

<p> </p>

<p><br />
<!--<div class="form_item">-->
<!-- <div class="form_element cf_button">-->
<input class="button_left" value="Verzenden" name="button_11" type="submit" /><input class="button_right" type="reset" name="reset" value="Wissen"/>
<!-- </div>-->
<!-- <div class="cfclear"> </div>-->
<!--</div>-->
</p>

</fieldset>

=====================================================

Could someone tell me or point me in the right direction as to why the submitted data is not sent in the e-mail (or only part of it is sent??)

Thanks and Regards....
Orlando
nml375 04 Dec, 2009
Hi Orlando,
Could you enable debug output on your form, do a test submission, and post the result here?

/Fredrik
obrowne 05 Dec, 2009
Hi Fredrik,
Thanks for your prompt reply!

I have enabled debug mode, and these are the results:

Debug output:
=======================================================================
Form passed first SPAM check OK
Form passed the submissions limit (if enabled) OK
Form passed the Image verification (if enabled) OK
Form passed the server side validation (if enabled) OK
$_POST Array: Array ( [Onderwerp ] => Ik heb een vraag [radio0] => Dhr . [Voornaam ] => orlando [Achternaam ] => browne [Email] => [email]orlando.browne@gmail.com[/email] [Adres ] => isebrandtsheerd 33 [Postcode ] => 9737LH [Plaats ] => Groningen [Telefoon_mobiel] => 0655767378 [Vraag_opmerking] => Dit is een test in debug mode [button_11] => Verzenden [28354eaed4063bd92d379020ee415743] => 1 [1cf1] => f84bbd44f7adca262a6724688c121e0f [chronoformname] => CVKH_form )
$_FILES Array: Array ( )
Form passed the plugins step (if enabled) OK
An email has been SENT successfully from ()orlando.browne@gmail.com to [email]info@o-line.nl[/email]
Debug End
=========================================================================

Sent e-mail content:
===========================================================
From: [orlando.browne@gmail.com]
To: [email]info@o-line.nl[/email]
CC:
BCC:
Subject: CVKH formulier contact

Onderwerp: {Onderwerp}

Aanhef: Dhr
.


Voornaam: {Voornaam}

Achternaam: {Achternaam}

E-mail: [email]orlando.browne@gmail.com[/email]

Adres: {Adres}

Postcode: {Postcode}

Plaats: {Plaats}

Telefoon/mobiel: 0655767378

Vraag/Opmerking: Dit is een test in debug mode

Spam controle: {imageverification}
==================================================================

I find it odd that some fields are being processed correctly and others not.

Regards,
Orlando
nml375 05 Dec, 2009
Hi Orlando,
There seems to be a space at the end of some of the form field names, or actually, it's a newline. That's no good. Remove any and all whitespace characters from the name properties, and you'll see that it works perfectly fine.

/Fredrik
obrowne 05 Dec, 2009
Hi Fredrik,

I'm a bit puzzeled here.....
As far as i can see there are no white spaces or line breaks.

When i copy the form code to a txt file, the whole <input> line seem to be on one line with no line breaks.

Any wrapping that there is occurs automatically due to lack of space in the display field.

So my question is.... where is it that I should elliminate spaces or line breaks??


REMARK!!!!!
The code that i am lookig at and modifying is under the "Form code" tab > Form HTML


Regards...
Orlando
nml375 05 Dec, 2009
Hi Orlando,
Please check the source html of the generated form page. The following exempt is from the dutch form, and you'll see there's a newline at the end of the field name property:
  <!--</div>-->
  <!--<div class="cfclear"> </div>-->
<!--</div>-->
<!--<div class="form_item">-->
<!--<div class="form_element cf_textbox">-->
    <label>Voornaam
:</label>

    <input class="cf_inputbox required validate-alpha" maxlength="50" size="36" title="Vul a.u.b. uw voornaam in. (Alleen letters!)" id="text_2" name="Voornaam
" type="text" value=""/> 
<!-- </div>-->
 <!-- <div class="cfclear"> </div>-->
<!--</div>-->
</p>


/Fredrik
obrowne 05 Dec, 2009
Hi Fredrik,
I see your point now....
When i view the HTML source-code through the browser on Internet < right mouse click view source> i also see the new lines that you mention, However if i look at the code through the Joomla admin pannel > CF componant > Form > Form-code tab > Form HTML, i see NO NEW LINES in de name attribute

Take for example the input vanlue Achternaam or Voornaam a little bit higher up in the code...(which is broken when you look at the source-code, but not broken in de CF componant code) as the following image shows: (can you explain????)
nml375 05 Dec, 2009
Hi Orlando,
I can see the confusion, to be honest, that's the first time I've seen that behaviour.. I'm wondering if there's some control character in there that is rendered as a newline in the source view, but not shown as one within the textarea input..

Could you try "rewriting" the name property of one input, and see if it works? (delete the whole name="Voorname" and write it back by hand again)

/Fredrik
obrowne 05 Dec, 2009
Hi Fredrik,

That was a good suggestionn..... however, to no avail! :-(

I have deleted name="Voornaam" then typed it back again.
Then ran a test submission... same result.

Could this be some kind of bug?
nml375 05 Dec, 2009
Hi Orlando,
Then I'm baffled. If it's a bug, then it must be a very rare bug, as I've never seen anything like this sofar. Could you use phpmyadmin or some similar tool to check/edit the database record for the form in a similar manner? Should atleast tell us whether the newline is introduced in the form setup, or when the form is generated..

/Fredrik
obrowne 05 Dec, 2009
Hi Fredrik,

i will try.. as i am not so handy with working directly in de MYSQL database, and i am afraid to break something.
So it will take me some time.

Any suggestions to point me in the right direction for finding the record and checking/changing it?

Orlando
nml375 05 Dec, 2009
Hi Orlando,
The tablename would be something along jos_chrono_contact and the record would have the same id as you see in the forms manager. You'd then be looking for the 'html' table column which holds the actual html-code.

/Fredrik
obrowne 05 Dec, 2009
Hi Fredrik,

Thanks for the help, ponting me in the right direction.
The (automatic) linebreak behaviour is quite bizar....
To check see is my changes in the Joomla backend are actually being carried trough to the database,
I decidet to make the form code lighter by deleting all of the formerly commented-out code.

As you can see now in de source-code the line break is now a little different, but still in such a way that it hampers
the correct execution of the code

The breaks are now:
etc. etc etc... name="Voornaam
"
etc etc etc..
nml375 05 Dec, 2009
Hi Orlando,
oki... what if we re-arrange the properties, placing name first:
<input name="Voornaam" type="text" id="text_2" class="cf_inputbox required validate-alpha" maxlength="50" size="36" title="Vul a.b.u. uw voornaam in. (Alleen letters!)" />


/Fredrik
obrowne 05 Dec, 2009
Ohhh myyy....

Fredrik,

This is really baffling... When i put name first.. this is what happens... (see Voornaam at source-code)

=====================================
<p><label>Voornaam
:</label><input name="Voornaam
"
class="cf_inputbox required validate-alpha" maxlength="50" size="36" title="Vul a.u.b. uw voornaam in. (Alleen letters!)" id="text_2" type="text" value=""/></p>
=====================================
Somehow the name attribute is forcibly being wrapped!!!???? I can't understand why :-(
Really strange
nml375 05 Dec, 2009
Hmm... one last thought...
Have you tried using different browsers? Internet Explorer, Firefox, Chrome, etc?

/Fredrik
obrowne 05 Dec, 2009
Hi fredrik , sorry for the temp, Radio silence.
Just went from home. now at a friend behind laptop.

No have not yet tried another browser. At the moment i'm using
IE7. What browser are you using?

Will now first try to check the database.

Regards,
Orlando
obrowne 05 Dec, 2009
Hi Fredrik,

Your suggestion to try another browser seems to be promising!!!
I edited the Form-code trough the Joomla backend, saved it and then sent a test submission.
I check it (this time trough webmail client and not Outlook as i normally would do) and the data was recieved OK!! hura!!

Now... two new factors have been put into the equsion...
1) editing code in backend and saving throug fire fox and sending test trough fire fox
2) viewing results trough firefox and web mail

soo... the trouble maker could be IE not editing the code properly, or Outlook not accepting/ displying the results properly?

Next step is to sent a test form trough IE and check the results trough webmail client.
If that goes well....
then2) sent test form trough IE and check results trough outlook.

Stayy tunned
obrowne 05 Dec, 2009
Fredrik,

It seems that when you submitt a form trough firefox.... all is well.
All the data gets passed to the email and is deliverd accourdingly.

However this is not the case when you fill in the form using IE7 in any case
(don't know of other versions)

This seems to be an crossbrowser compatibility bug!

Will investigate further!!

Thanks for all your help...
If you have anymore insights please let me know.

Regards..
Orlando
nml375 05 Dec, 2009
Hi Orlando,
You can safely rule out the email client. ChronoForms will replace any {field} in the email template with the submitted value of the corresponding field before sending the email. Seeing {fieldname} instead of the actual value in your email means that ChronoForm did not recieve a value for that form field name.

The big difference is whether the generated form page looks proper after backend-editing it using FireFox as opposed to IExplore.
Firefox tends to be more tolerant with malformed forms in general, so having firefox sending form data properly is not that surprising.

/Fredrik
obrowne 06 Dec, 2009
Hi Fredrik,
FINALY CASE SOLVED!!!

After all our attempts (that helpt narrow down the problem) and a break from the computer screen.
I tried to find a difference between those fieds that were working properly: (Email - Vraag_opmerking - Aanhef - Telefoon_mobiel)
and those that were not: ( the rest )

As you mentioned from the beginning... there were line breaks (new lines) within the name value atributes as for example
Name="Achternaam
"
etc. etc........

BUT WHY!!! So i continued looking for more similaritie and differences....

Then i saw THIS! (unbelieveble)
Label_Value - vs - Name_Value = equals
1) Onderwerp - vs - Onderwerp = NOT working
2) Aanhef - vs - Radio0 = working
3) Voornaam - vs - Voornaam = NOT working
4) Achternaam - vs - Achternaam = Not working
5) E-mail - vs - Email = working
6) Adres - vs -Adres = NOT working
7) Postcode - vs - Postcode = NOT working
8 ) Plaats - vs -Plaats = NOT working
9) Telefoon/mobiel - vs - Telefoon_mobiel = working
10) Vraag/Opmerking - vs - Vraag_opmerking = working

Do you see it?.... where the label values differ from the name values, the code works properly
and where the label values are identical to de name values, the code fails to deliver the inputted values.

So i did a test with Voornaam by changing the name value from Voornaam to Voor_naam while leaving the label value
as Voornaam. Also i obviously had to alter the e-mail template to reflect the change made to the name value as follows:
from {Voornaam} to {Voor_naam}.
Saved it and did a test submission.... AND WHAT DO YOU KNOW! IT WORKED!!

So i changed all the other equal values so that label value and name value differ, and altered the e-mail template accordingly!

I was worried that validation would not work anymore, but that turned out to be no problem! Validation works fine.

So Fredik, Do you think that this is a bug that needs reporting? or did i just overlook some chronoform rule?

I any case... THANKS FOR YOUR HELP! Couldn't have done it without you!

Cheers !!!!
Orlando
nml375 06 Dec, 2009
Hi Orlando,
God to hear you got it solved. I'm not sure as what to call it, and I have no idea what is causing this.. *scratches his head*

/Fredrik
This topic is locked and no more replies can be posted.