Forums

Parse Error in non-wizard forms

ctimusic 01 Mar, 2010
I'm in the process of migrating our old Microsoft FrontPage site to Joomla 1.5. Most of the forms on the old site we simple enough to rebuild using the Chronoforms wizard, but for some of them it was just simpler to select the form portion off the old website and paste directly into the "Form HTML" code section for Chronoforms. The three non-wizard forms have been working perfectly for a week or so, but I come in today and all three of them have the same identical error on the top of the form:

Parse error: syntax error, unexpected '-', expecting ',' or ';' in /home/ctiwebadmin/ctimusic.org/components/com_chronocontact/chronocontact.php(53) : eval()'d code on line 9

I did some searching on the forums, and found similar errors were due to hypens in the field names. I tried deleting all of the HTML code from a form and found the same error even with what should be an entirely blank form. Additionally, considering the error is identical on all three forms I think a hypen in a field name is unlikely to be the cause.

You can see the three non-wizard forms at:

http://ctimusic.dreamhosters.com/application.html
http://ctimusic.dreamhosters.com/reference.html
http://ctimusic.dreamhosters.com/sound-tech-questionnaire.html

For contrast, a form built using the Chronoforms Wizard

http://ctimusic.dreamhosters.com/concert-eval.html

On the whole Chronoforms has been a wonderful extensions; both simple and powerful. This has been the only problem that's cropped up thus far, but the problem has be a bit stumped.
nml375 01 Mar, 2010
Hi ctimusic,
You've got one or more form inputs with dashes (-) in their name. Remove or replace those with underscores (_), and re-create your DB Connection.

Further, your form code contains <form> tags, which is a big no-no when it comes to ChronoForms.
Especially, I found this block in your Application form:
				<form method="POST" action="--WEBBOT-SELF--" onSubmit="">

  <!--webbot bot="SaveResults" startspan S-Email-Format="TEXT/PRE"
  S-Email-Address="recruiting@ctimusic.org" B-Email-Label-Fields="TRUE"
  B-Email-Subject-From-Field="FALSE" S-Email-Subject="Application"
  S-Date-Format="%A, %B %d, %Y" S-Time-Format="%I:%M %p"
  S-Builtin-Fields="Date Time" U-Confirmation-Url="application_thankyou.htm" B-Email-ReplyTo-From-Field="TRUE" S-Email-ReplyTo="Current Email" U-File="../../../_private/apps.txt" S-Format="TEXT/PRE" S-Label-Fields="TRUE" B-Reverse-Chronology="FALSE" --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="0"><!--webbot
  bot="SaveResults" endspan i-checksum="43374" -->

I belive this block is in your Reference Form and Sound Tech Q Form aswell, and the main cause for your issues.

/Fredrik
ctimusic 01 Mar, 2010
Thank you for your reply. I'll definitely clean out those <form> tags, but I'm still a bit confused as to the source of the error. If I clean out all of the HTML code (which obviously includes the offending the form tags) I still get an error. For example:

http://ctimusic.dreamhosters.com/index.php?option=com_chronocontact&chronoformname=Team_Application_Form_blank

And that still doesn't explain why the error popped up now. The offending <form> tags were present for the week or so that the forms worked without the error. I appreciate your help.
nml375 01 Mar, 2010
Hi ctimusic,
It's not the <form> tag, although they will break the HTML-spec, but the input field within that block:
<input TYPE="hidden" NAME="VTI-GROUP" VALUE="0">

It's name-property contains an invalid character, -

Once that's been removed, you'll have to recreate or edit the database-table, so that the table field names match the input fields of the form, and then redo the db-connection. Sorry that I missed the database-table part in my last post.

/Fredrik
GreyHead 01 Mar, 2010
Hi ctimusic,

Line 53 evaluates the stored database table info. Might there still be dashes in the column names there? if you've changed the column names you can refresh the DB connection by setting it to No, Applying the form, setting it back to Yes and Applying again. This forces ChronoForms to get a fresh copy of the column names from the database to replace the stored copy.

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