validator: one of two text boxes require a value

S

smarty

Hi,

Please could I have some help with using the webform validation controls. I
have found two problems when trying to use them.

1. Although they do not show a visable error until they do the validation
they still take up the space of a nomal text box on the form, so when placed
next to the textbox control where they will show the error text on validation
there is white space left where the text would be.

Is there a way of ensuring the space is only taken up if the text is to be
displayed?


2. I have setup a webform using the required value validator control, which
works fine for most fields on the form. I have two text boxes on the form
that are for recording contact details. The customer only need to fill in
one of the two contact details as their prefered contact method. So only one
of the two text boxes must contain a value.

I thought this must be a common situation in validating input but haven't
found a way to acheive this using the validator controls. Is there a way?

So far I have tried the following:

a) Using a custom control. This works but I could only link this to one
textbox. This is confusing for a user who types in to most fields and the
error is removed prior to re-submitting the form but When the user types into
the unlinked textbox the error is not removed.

b) Using a compare control. It allows two controls to be specified but
does not appear to allow custom validation to be used and the predefined
operation is not suitable for enforing a required field.

c) for now I have done all the validation in the submit button using
labels, which works but the user has to submit to see if they have cleared
the error, so it would be nicer to use one of the built in controls if this
is possible.

Thanks in advance for any help you can provide with this
 
J

James VanDyne

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top