that's pretty much what I would have done... but I'd leave the
database name out of the item, and add a little more structure
<survey>
<head>
<database>tblUserProfile</database>
<validity id="phone"
type="regex">/^((\[0-9]{3}\))?\s*[0-9]{3,7}$/</valid>
whatever is needed to define the survey
</head>
<questions>
<question>
<field>fldPhone1</field>
<verify validity="phone"/>
pretty much what you had for item.
</question>
<questions>
</survey>
Do you think this could be globally useful? should we do a schema and
the whole 9 yards?
I designed a schema for recipes a few years ago.... it really helped
write cookie recipes (the real cookies, not web cookies!)
On 3/9/07, Jake McGraw <[EMAIL PROTECTED]> wrote:
> Jake,
>
> That's actually a brilliant idea! Something allow the lines of:
>
> <item name="phone1" type="numeric_string" max="14" min="10">
> <desc>Phone Number</desc>
> <database>tblUserProfile.fldPhone1</database>
> <valid
> type="regex">/^((\[0-9]{3}\))?\s*[0-9]{3,7}$/</valid>
> </item>
>
> This is exactly what I've been looking for, as I've been charged with making
> a couple of forms and I wanted the thing to be reusable.
>
> Thanks, just goes to show, this list is really top notch.
>
> - jake
>
>
> On 3/8/07, Ⓙⓐⓚⓔ <[EMAIL PROTECTED] > wrote:
> > Are you in the survey business? I dealt with computer surveys at an Ad
> > agency, some time ago.
> >
> > rather than coding any survey in html, I'd do it in XML!
> >
> > the simple list of questions with prerequisite answers, that would
> > have to be true before you ask a question.
> >
> > by asking the questions 1 at a time, you get more accurate answers
> > from the respondents, and don't show them the results until you've
> > processed the whole survey, as they might be tempted to sway the
> > survey!
> >
> > Allowing them to fix there answers, gets tricky so you should keep
> > both answers, and take a look, often it was a mistake, other times
> > they want to cheat! It's also important to know who entered the
> > survey, and if they have done it twice, either login or drop them a
> > cookie... but log their IP address too!
> >
> > The more hidden information you can gather from their browser the
> > better, even if you don't plan on using it!
> >
> > although this might have gone a little off the jquery topic, I would
> > use ajax to fetch the xml survey and do all the dynamic questioning
> > with jquery.
> >
> > it's also a good idea to randomize the choices... lots of people pick
> > option A (or the first ). so capture the selected choice along with
> > the way the question was presented. In the old days we used different
> > scripts for the survey giver to use to ask the questions.
> >
> > I guess my old life at the ad agency still colors my opinions about
> > the validity of data.
> >
> >
> > On 3/8/07, Agrawal, Ritesh <[EMAIL PROTECTED]> wrote:
> > >
> > > Hi,
> > >
> > > I need some idea on how to do this.
> > >
> > > I have a big user survey form. It has around 25 fields. However,
> depending
> > > on the type of user such as administrator, member, etc...many fields are
> not
> > > required. In my survey form, a user will select "user type" from a
> select
> > > box.
> > >
> > > My problem: I don't want to scare off users from filling the survey
> form.
> > > Thus, I want to display only the relevant fields depending on the user
> type
> > > they have selected. What I would like to do is to add some script to
> change
> > > method of select box and hide/show fields dependening on the selection.
> > > However, I am not sure what's the best way to handle list of box to show
> and
> > > hide...I am trying to avoid a long list of if else ..
> > >
> > > any idea is welcome
> > >
> > > Regards,
> > > Ritesh
> > > --
> > > View this message in context:
> http://www.nabble.com/need-some-idea-tf3371424.html#a9381497
> > > Sent from the JQuery mailing list archive at Nabble.com.
> > >
> > >
> > > _______________________________________________
> > > jQuery mailing list
> > > [email protected]
> > > http://jquery.com/discuss/
> > >
> >
> >
> > --
> > Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
> > _______________________________________________
> > jQuery mailing list
> > [email protected]
> > http://jquery.com/discuss/
> >
>
>
> _______________________________________________
> jQuery mailing list
> [email protected]
> http://jquery.com/discuss/
>
>
--
Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/