close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

CSS Form Building Error when editing existing form

Thread began 12/20/2009 6:30 am by info283152 | Last modified 1/09/2010 1:49 pm by anonymous | 2243 views | 15 replies |

info283152

CSS Form Building Error when editing existing form

Hi,

I have recently bought CSS Form Builder but I am yet to get it successfully working to modify an existing form.

I have already used DataAssist to create the two Search and Results pages to enable users to quickly check if a date is available in the database and this works successfully. However, when typing the date into the text area users must type mm/dd/yyyy and after a long time of not being able to change it to dd/mm/yyyy I purchased CSS Form Builder.

However, I have uploaded all files to my testing server and when I type in a date and click submit, the results page shows the following error message:

Warning: preg_match() [function.preg-match]: Unknown modifier '(' in /Library/WebServer/Documents/ourbigdayonfilm/WA_ValidationToolkit/WAVT_Scripts_PHP.php on line 206

Warning: Cannot modify header information - headers already sent by (output started at /Library/WebServer/Documents/ourbigdayonfilm/WA_ValidationToolkit/WAVT_Scripts_PHP.php:206) in /Library/WebServer/Documents/ourbigdayonfilm/WA_ValidationToolkit/WAVT_Scripts_PHP.php on line 71


Any help would be appreciated.

Kind regards

Tom

Sign in to reply to this post

Office Guy-172461

Start with this:

Solving the "headers already sent" problem
148/

Sign in to reply to this post

info283152

Now getting Javascript error

Thanks for your advice. I checked both the pages and the headers are all fine. So I've decided to delete all my files and replace the entire site with my backup site files which I created before I added CSS Form Builder. Therefore effectively starting a fresh. However, this time when running I am getting the enclosed error, preventing the Form Building from completing. I did actually have this a couple of times previously but on third attempt it works.

Any further advice would be great.

Tom

Sign in to reply to this post

Office Guy-172461

It is unlikely that you would get the "Headers already sent" error if you didn't have a problem with your code. It's not about your headers but the code that's trying to modify them.

For your Java script error, try step 1:
146/

Sign in to reply to this post

Eric Mittman

As for the headers error you are getting this can also happen when an error occurs on the page, it is actually the printing of the error message itself that is the output that has occurred.

As for the error that is specified here is the line of code:

php:
if (preg_match("/".$dateFormatStr."/i", $value)==0)  {



Based on what you are getting in the error I'm wondering if there is a problem with what has been specified as the date format when applying a validation to the field in your form. Did you specify a date type of validation somewhere on the form? If so how did you set this up?

The error seems to be that there is an '(' in here somewhere that does not belong.

Sign in to reply to this post

Thomas Hill

Almost solved but not quite

Hi,

Thanks for the great advice so far, however I think I may have almost solved this but not completely.

1. I took a look at the code in my results page and I had forgotten that I had added the following line of code to make the date result appear in a UK format
<?php echo date ('d/m/Y', strtotime($row_WADAusers['wedding_date'])); ?>

I therefore changed this back to the original page created by Data Assist and ran the process again without the Javascript issue.

2. I then tried previewing the pages but I was still getting the same error results with regards to the headers etc. So I then took your advice to check what date formatting I was applying when using form builder. I have started by going back into Form Builder by clicking on Edit Contents and changing the format type from Date with the format dd/mm/yyyy to selecting None. And this time there are no page errors

However, regardless of what is typed in the form field results in the most recent database entry being displayed.

I am now even more confused.

Some more help would be appreciated.

Sign in to reply to this post

Eric Mittman

So the form you have that is working now is submitting a date to the results page correct. Then on this results page it seems to be pulling the wrong record based on the date that you have entered?

If this is the case please post back with a copy of the results page so that we can take a look at a couple of things. Also, please describe how you have setup the search on this results page for the date.

Sign in to reply to this post

Thomas Hill

Search & Results Pages

Hi,

After the last posting, I decided to rebuild the pages from scratch in case I missed something. I began by using DataAssist to create the Search and Results pages which worked fine, apart from that when a date is entered by the user it must be entered as mm/dd/yyyy hence the reason why I purchased Form Builder as I want users to type dd/mm/yyyy.

However, after running Form builder and selecting the date format option dd/mm/yyyy and then sending all files to the test server I get the original message I posted at the beginning of this thread. If I remove the date format option in Form Builder and select None, the form will accept the entry but every entry in the database is shown in the results page.

I have enclosed the pages for you to have a look at...

Attached Files
availability.zip
Sign in to reply to this post

Eric Mittman

Thanks for including the pages in your post. I was testing with your pages and I could not get the error to occur for me. If you could please post back and include a little more info about how you are applying the reformatting of the date. Are you using the validation wizard to apply the validation or are you using the server validations that are on the page? Please let me know exactly how you are applying the validations so that I can create the problem the same as you are experiencing it. Also, what are the values you are entering into the form when the error occurs? It seems that there is some part of this that I'm not doing the same as you since I do not get the same result.

Sign in to reply to this post

Thomas Hill

Movie

How strange. I thought the best way to tackle this is if I make a short movie for you so you can watch me creating these pages from start to finish and that way you can spot (hopefully) where I am going wrong.

The link to download the movie is help.mov

I am also including the two pages I ended up with at the end of the movie which do not work after applying Form Builder.

I hope that this will make things clearer.

Thanks again.

Tom

Attached Files
pages.zip
Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...