/    Sign up×
Community /Pin to ProfileBookmark

Ensuring Correct Field Entries but….

Hello again, (transferred this post)

I’ve been trying to really put together this script to be more…uhmm…”form friendly” to site visitors or whoever would care to fill it up…but at the same time, make sure that they properly fill up the field forms…i.e. really put in a correct email, telephone nos. etc…

The script attached has already been “fixed” of some bugs (at least those w/c ive found)…thanks to a couple of forumers here (see my previous posts). However, I still want it to be even more… “form friendlier”…if you care to check out the script…all fields are ensure that all the data field entries are correctly inputted..name, email, telephone no. etc…however, it also Requires that these fields are filled up before submit (you cant leave it blank)…How can I turn this “requirement” off without sacrificing that the correct field entries are inputted??? What do i need to change or take out of the script?

I just realized that I seem to have focused too much in requiring that field entries Not only be properly filled up but also have to be filled up.

[upl-file uuid=53555581-ee7b-4922-b4b9-f209215dde75 size=3kB]validating_fieldforms.txt[/upl-file]

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@Four_of_FiveauthorFeb 27.2003 — Thanks Dave,

I was kinda hoping you'd be the one to "handle" this one ?

I'm not exactly sure yet where' you're going with...but even before I applied the change you suggest, I seemed to have "overlooked" a script error from the original script:

Line: 73

Char: 9

Error: 'return' statement outside of function

Code: 0

Uhmm..I i think this needs to be addressed first...how do I fix it? I'm too much of a greenhorn to understand this one.
Copy linkTweet thisAlerts:
@Four_of_FiveauthorMar 01.2003 — Dave,

Thanks for all your advice...i think i finally sorted out the "bugs"...for the initial script error, somebody advised me to just delete the last four lines..:p (w/c i've started doing like crazy...

As for the validating "empty" or non-entries...i just inserted this line:

if (form.required_whatever.value != ''){

...above every name value... and closed it with 2 }

dunno, but it works...
Copy linkTweet thisAlerts:
@Four_of_FiveauthorMar 06.2003 — Hello again,

I'm not sure if you guys are still following this thread...but I need another modification ? Previously, my problem was a field was NOT accepting data entries with 2 or more blank spaces in between entries or characters....

Now, i want the reverse...I want it NOT TO Accept any blank spaces in between field entries or characters...

To be exact, I need a "Numbers field" ony that should NOT accept Blank Spaces in between numbers...

Change requests are driving me bonkers...appreciate any input ? Attached is the "current" script for your perusal..

[upl-file uuid=1d89e5d1-e3d3-43c6-8ba1-8654c6cf9624 size=5kB]feedback_formvalidation.txt[/upl-file]
×

Success!

Help @Four_of_Five 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 5.18,
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: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

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

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...