Forums

Error after filling out form

Kellie 25 Jan, 2010
To test my form, I filled it out and clicked on submit and got this error.

Parse error: syntax error, unexpected '[' in /home/sonoma/public_html/components/com_chronocontact/libraries/chronoform.php(258) : eval()'d code on line 3

1.You have entered an incorrect verification code at the bottom of the form.


Not sure how to fix the error. Can you help?

Thanks in advance.
Kellie
nml375 26 Jan, 2010
Hi Kellie,
Could you paste your Serverside Validation code? The error is within this, on line 3.

/Fredrik
Kellie 26 Jan, 2010
Hi Fredrik,

The server side validation code is as follows,

<?php
global $mainframe;
if( JRequest::getVar['text_9'] != JRequest::getVar('text_10'))
return 'Sorry, your passwords do not match, please try again!';
?>

Thanks,
Kellie
Kellie 26 Jan, 2010
Hi,

I am trying to collect information each time a client goes to a certain page in my web site. So, I do not need to validate a password. I do not even need a password. All I want is for my clients to fill out the information each time they view a page and for that to be emailed to me. Can you help me set up my form to where it does not have to have a password? Yet it will still email the collected information each time?

Thank you very much.

Kellie
GreyHead 26 Jan, 2010
Hi Kellie,

The serverside code to check the fields would be
<?php
if( JRequest::getVar('text_9') != JRequest::getVar('text_10') ) {
  return 'Sorry, your passwords do not match, please try again!';
}
?>
If you don't need a password field then just remove it (them) from your form. There's no requirement for a password unless you are registering new members.

Bob
Kellie 26 Jan, 2010
Thank you Bob. Now I still get the error

You have entered an incorrect verification code at the bottom of the form.

When I try to fill out the form. Not sure where to check verification codes. Can you help?

Thank you very much for your help.

Kellie
GreyHead 26 Jan, 2010
Hi Kellie,

Sounds as though you have turned Anti-Spam on but not included {imageverification} in your form HTML.

Bob
Kellie 26 Jan, 2010
Thank you Bob!

Ok. Now once I filled out the form, I see this message below:

E-mail message
From: Administrator [admin@networklubricants.com]
To: [email]rsingletary@networklubricants.com[/email]
CC:
BCC:
Subject: NL Registration Form Results

NL Registration Form Distributor/Co Name Testing City, State Bella Vista, AR Contact Name Kellie Email [email]kellieanderson72@gmail.com[/email] Phone Number 479-531-5318 Submitted by 65.65.35.35

Files:

1.Form passed first SPAM check OK
2.Form passed the submissions limit (if enabled) OK
3.Form passed the Image verification (if enabled) OK
4.Form passed the server side validation (if enabled) OK
5.$_POST Array: Array ( [text_1] => Testing [text_2] => Bella Vista, AR [text_3] => Kellie [text_4] => [email]kellieanderson72@gmail.com[/email] [text_5] => 479-531-5318 [button_7] => Submit [35d8735a4746cc54e4fe14550ce9d506] => 1 [1cf1] => c88b2dba667b780fc3b441fea305bcf7 [chronoformname] => NLLogin )
6.$_FILES Array: Array ( )
7.Form passed the plugins step (if enabled) OK
8.An email has been SENT successfully from (Administrator)admin@networklubricants.com to [email]rsingletary@networklubricants.com[/email]
9.Debug End
10.Redirect link set, click to test:
http://www.networklubricants.com/index.php?option=com_content&view=article&id=12&Itemid=8

How Can I bypass all that and have the client go directly to the article intended?

Thanks again.
GreyHead 26 Jan, 2010
Hi Kellie,

You have the form Debug on - turn it off in the Form General tab.

Bob
Kellie 26 Jan, 2010
Looks great Bob. Thank you very much for all your help.

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