close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Validation Show If Javascript error

Thread begun 1/18/2011 5:12 pm by jcav26033 | Last modified 1/26/2011 1:04 pm by Jason Byrnes | 7078 views | 13 replies |

jcav26033

Validation Show If Javascript error

Hi, I have been using form toolkit with Universal Email 4.01 successfully until today. Any time I try to apply the Validation Show If behavior I get a javascript error from the file WAFV_ShowIf.htm

I have datepicker, captcha, file upload behaviors, progress bar, and server validations all applied already per instructions and as I have done before (except I have never combined the progress bar, file upload behaviors and datepicker along with the validation together before) and adding the show if behavior is my last step before testing the form.

I have deleted the cache and restarted but keep getting the javascript error. Right now I am at work and using CS3 with Mac OS10.4.11. I will try again tonite at home with CS5, Mac OS10.66 and see if I get same error. There is nothing else unusual on the form page...any ideas?

Sign in to reply to this post

Jason ByrnesWebAssist

please post the exact error text, this will help us in determining the cause of the issue.

Sign in to reply to this post

jcav26033

Validation failure

Hi Jason, I finished up the job at home with no javascript error, but now the page submits with intentional validation errors, doesn't retain the dynamic entries from each field, doesn't upload a file, doesn't display any of the show-if messages, and sends no email.

The URL is here: event.php and I have attached the file along with all the web-assist generated directories & files to this message, except for the fonts used in Captcha since it made the zip go over the forum limit. When the zip is unpacked, the file and directory locations will be correct as they are in the site.

Thanks for looking into this. It's the first time I haven't had success with this combo of Form Toolkit and UE4.

Sign in to reply to this post

Jason ByrnesWebAssist

the obvious issue that i see is that you have not specified a method for the form. This is causing the form to use the default method of GET, to upload a file and send the email, the forms method must be set to use POST:
edit the form tag to:

php:
<form enctype="multipart/form-data" class="clean" method="post">
Sign in to reply to this post

jcav26033

Well, this is a perfect case of not being able to see the tree for the forest. Or as Homer Simpson would say, "D-O-H."

It is now submitting and uploading, but there are no files attached to the received email, although they are uploaded to the server, and the basic email I receive is skipping over the file upload fields in its array of form fields that it reports.

I did run across one other problem and maybe I am going about this the wrong way, but I am trying to restrict file uploads to only jpegs or PDF files and I used the restrict content validation to only pass certain filename extensions but it doesn't seem to be working since I uploaded a tiff file this morning which is a disallowed file extension. Is there a way to only pass allowed extensions rather than disallowing any other extensions?

Thanks!

Sign in to reply to this post

Jason ByrnesWebAssist

the file names will not show in the email.

Since you are using file upload to upload the files to the server, you will need to use the entered value option on the attachments tab.

click the lightning bolt next to entered value and then expand the WA Uploaded Files (file_01) binding group. Select the server directory binding, this will add the following code:
<?php echo $WA_DFP_UploadStatus["WA_UploadResult1"]["serverDirectory"]; ?>

copy that, then click the lightning bolt again, this time, select the server file name variable. the code will now look like this:
<?php echo $WA_DFP_UploadStatus["WA_UploadResult1"]["serverFileName"]; ?>

Past the server directory code in front of that so the entire code is:
<?php echo $WA_DFP_UploadStatus["WA_UploadResult1"]["serverDirectory"]; ?><?php echo $WA_DFP_UploadStatus["WA_UploadResult1"]["serverFileName"]; ?>

add another entered fvalue for the atachements and use the same steps, except get the variables from the WA Uploaded Files (file_01) binding group, the final code will look like:
<?php echo $WA_DFP_UploadStatus["WA_UploadResult2"]["serverDirectory"]; ?><?php echo $WA_DFP_UploadStatus["WA_UploadResult2"]["serverFileName"]; ?>


To restrict a file type by extension, use the File Extension validation type, not the restrict content type.

Sign in to reply to this post

jcav26033

Thanks so much for your help. I wish it was easy to compile all the fixes, methods, and nuances that we get from the support forums and put them in the extension documentation. So am I correct (for future knowledge) that UE4 will automatically attach files to emails (assuming the form was correct to begin with of course) but applying the file upload behavior routes the file to the server instead of attaching it to the email? I guess I expected it to do both...but it works for this situation as it is, just want to know future options...

Sign in to reply to this post

Jason ByrnesWebAssist

Yes, if the file upload behavior is used, you will need to use the method described here.

Sign in to reply to this post

jcav26033

Hi Jason,
The Javascript error is back. Here exactly is what it says:
"While executing applyServerBehavior in WAFV_ShowIf.htm, a Javascript error occurred."
I was trying to change the Show If behavior for the file upload field to match the changed validation from Restricted Content to File Extension validation.

Sorry but it is a pretty obtuse error, no error code or anything. Any ideas?

Sign in to reply to this post

Jason ByrnesWebAssist

maybe try removing the validation show if behavior, then recreating it instead of editing it.

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...