dependent form fields, etc.

C

Chris

HI...I'm using FP2003. I have three issues I wish to
resolve and cannot find out how. I am not a professional
at this, so be kind. Also I have some experience in
Access db and VBA coding there.

I am able to create a form and get input,etc. to work
properly.

My learing/doing issues are:

1. How do I create a form field input template for phone
numbers?

2. How do I require an entry in field 2 if field 1 is
selected, but not if field 1 is not selected?

3. How do I validate the user's email addy (comparing two
separate form fields entered separately but in adjacent
form fields)?

Can these be done in FP?

Thanks for helping,
Chris
 
J

Jim Buyens

Responses interspersed...

Chris said:
HI...I'm using FP2003. I have three issues I wish to
resolve and cannot find out how. I am not a professional
at this, so be kind. Also I have some experience in
Access db and VBA coding there.

I am able to create a form and get input,etc. to work
properly.

My learing/doing issues are:

1. How do I create a form field input template for phone
numbers?

Use three text boxes.
2. How do I require an entry in field 2 if field 1 is
selected, but not if field 1 is not selected?

You would have to write your own JavaScript code or, better yet, your own
ASP.NET or ASP code.
3. How do I validate the user's email addy (comparing two
separate form fields entered separately but in adjacent
form fields)?

You would have to write your own JavaScript code or, better yet, your own
ASP.NET or ASP code.
Can these be done in FP?

Thanks for helping,
Chris

Only by switching to Code view and typing in the code.

Jim Buyens
Microsoft MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Windows SharePoint Services Inside Out
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
 
J

Jon Spivey

Hi Chris,
1 - not sure how you guys format your phone numbers (I'm assuming USA) so
someone else will have to step in here :)
2 and 3 - We can write one script to do both jobs - something like this

<script type="text/javascript">
function checkForm(f){
if(f.whatever[0].checked && !f.details.value){alert('Please enter
details');f.details.focus();return false;}
if(f.email.value != f.email1.value){alert('Emails must
match');f.email.focus();return false;}
return true; }
</script>
<form onsubmit="return checkForm(f);">
Do you? Yes <input type="radio" name="whatever" value="yes"> No<input
type="radio" name="whatever" value="no"><br>
If yes please enter details <input type="text" name="details"><br>
Your Email <input type="text" name="email"><br>
Confirm Email <input type="text" name="email1"><br>
<input type="submit">
 
Top