/    Sign up×
Community /Pin to ProfileBookmark

fixed/not deletable prefix/value

Hi all,

not even sure if you should put this in the javascript section, but I assume I should. Couldn’t find this really so far, but maybe I’m not sure about the keywords I should use…

For phone number fields, I’d like to set a fixed prefix/value which the user can’t delete. For example in the Netherlands, a mobile number [B]always[/B] starts with ’06’. Now I set the inputfield.val(’06’), but the user is still able to change this.

Anyone has an idea? Thanks in advance!

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@wmwongMar 12.2013 — If you don't want it editable, don't put it in the input field. Have it outside.

06-<input type="text" />
Copy linkTweet thisAlerts:
@xelawhoMar 13.2013 — two input fields?
[CODE]<input disabled value=06><input>[/CODE]
×

Success!

Help @timm49 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.2,
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: @meenaratha,
tipped: article
amount: 1000 SATS,

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

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