close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

couple of 'issues' with a form

Thread began 6/10/2013 6:57 am by Jamie | Last modified 6/18/2013 9:02 am by Jamie | 1753 views | 9 replies |

Jamie

couple of 'issues' with a form

Hey Jason

Have got a pretty lengthy form which is located here: http://www.cyoungopticians.co.uk/questionnaire.php?

Have 4 questions/issues I am facing:

1. there are 2 datepickers - one under Date of Birth and the other under date and time of assessment. For some reason, that I cant work out, the datepicker isnt showing when the field is clicked on.

2. The last field in the form (which is a yes/no radio) is required, but I seem to have lost the error text and focus?

3. in the sent email, is there any way to show the radio groups regardless of whether or not the user has inout a yes or no answer? or does it need to have an answer to achieve this?

4. is there a tutorial anywhere for retrospectively making a field required?

Have attached the file in case you needed it.

Many thanks

Jamie

Sign in to reply to this post

Jason ByrnesWebAssist

1) there are a number of coding issues on this page that are causing the javascript to fail, for example:

<link rel="shortcut icon" href=favicon.ico" type="image/x-icon" />
should be:
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />


<div class="fieldGrou;"> <span id="DOB_Spry"> <span>

should be:
<div class="fieldGroup"> <span id="DOB_Spry"> <span>


you have a number of elements that have commas in the name, this is not valid:
<input type="radio" name="Eyes_sting,_burn_or_sore_after_reading_for_a_while" id="Eyes_sting,_burn_or_sore_after_reading_for_a_while__1" value="Yes" class="formRadioField_Standard" tabindex="42">

form element names can contain only letters and numbers, those are jsut a few examples, i found that if i stipped all of the code from your page and had only the date picker elements in place, they started working, so there is a quite a bit of on this page that is badly formated and causing the problem.

2) Most likely a result of the coding issues from 1

3) It needs to have an answer to achieve this, the best bet is to add a Yes, No, NA option to each radio group and make NA selected by default.

4) Edit the server validation server behavior to add additional validations to the form.

Sign in to reply to this post

Jamie

thanks Jason

Have spent ages troubleshooting this form and now have got the validations working and the datepicker but I havent got the success page sorted.

Basically the success content is held in the same page as the form itself and have put in

php:
<?php if(isset($_SESSION["waue_VT_1_Status"]) && $_SESSION["waue_VT_1_Status"] == "Success") { ?>


//   Then the form goes here   //

<?php ?>
      <?php //var_dump($_SESSION); ?>
      <?php if(isset($_SESSION['waue_VT_1_Status'])) unset($_SESSION['waue_VT_1_Status']); ?>



I've obviously got a reference point wrong but not sure what I should be looking at....

Have attached the page file should you need it

Sign in to reply to this post

Jamie

sorry Jason... forget the above as have managed to fix it and its working great.

Thanks

Jamie

Sign in to reply to this post

Jamie

On this same form, I have 2 datepickers. One is for current dates and one is for date of birth.

How would I go about changing the available years for the date of birth datepicker?

Cheers

Jamie

Sign in to reply to this post

Jason ByrnesWebAssist

you would need to edit the date picker code, and add a yearRange argument:


the code for the DOB element is:

$(function(){
$('#DOB').datepicker({
changeMonth: true,
changeYear: true,
dateFormat: 'dd-mm-yy',
showAnim: 'show',
onClose: closeDatePicker_DOB
});
});




change that to:

$(function(){
$('#DOB').datepicker({
changeMonth: true,
changeYear: true,
yearRange: '1950:2013',
dateFormat: 'dd-mm-yy',
showAnim: 'show',
onClose: closeDatePicker_DOB
});
});
Sign in to reply to this post

Jamie

Thanks

Jamie

Sign in to reply to this post

Jamie

another quick Q Jason. How would I preselect a specific year for that datechecker?

Sign in to reply to this post

Jason ByrnesWebAssist

add a default date:

yearRange: '1950:2013',
defaultDate: '02/22/1989',

that will pre select February in the month list and 1989 in the year list

Sign in to reply to this post

Jamie

thanks Jason

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