/    Sign up×
Community /Pin to ProfileBookmark

6 must fields…

I have 6 different fields. How can I make it that way that if the user fill in one so he need to fill’em all?

Thanks

to post a comment
JavaScript

5 Comments(s)

Copy linkTweet thisAlerts:
@JonaJan 27.2005 — [i]Originally posted by weee [/i]

[B]I have 6 different fields. How can I make it that way that if the user fill in one so he need to fill'em all?



Thanks [/B]
[/QUOTE]


[font=trebuchet ms]Can you rephrase that?[/font]
Copy linkTweet thisAlerts:
@weeeauthorJan 27.2005 — I have a form with some fields. Only one part of the form is not s must BUT if the user fill in one field out of those 5 he gotta fill'em all.
Copy linkTweet thisAlerts:
@Willy_DuittJan 27.2005 — I thought you had 6 fields broken into two sets... One of four elements and another of two...

http://www.webdeveloper.com/forum/showthread.php?s=&threadid=54544

Anyway, didn't you learn anything in that thread and the other simular one before it?? At least post your form codes so people do not have to continually write form html to demonstrate a few lines of javascript...

.....Willy
Copy linkTweet thisAlerts:
@weeeauthorJan 27.2005 — I still had a problem with it BUT it's a different issue.
Copy linkTweet thisAlerts:
@weeeauthorJan 27.2005 — var count = 0;

if ( document.registration.fld1.value != "" ) ++count;

if ( document.registration.fld2.value != "" ) ++count;

if ( document.registration.fld3.value != "" ) ++count;

if ( document.registration.fld4.value != "" ) ++count;

if ( count != 0 && count != 4 )

{

alert("All details has to be complete");

return false;

}


Thanks!
×

Success!

Help @weee spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...