Limit customer firstname and lastname in m2How to override .phtml files in Magento 2Added last name and search functionality in Customer GridWhy Magento ask First Name and Last Name?How to remove firstname, lastname validation (magento 1.9)How to post customer firstname & lastname into database magento 2.1.1?Magento 2 -Limit the length of the product name on the front end.Magento 2 Catch customer creation event on both frontend and adminMagento 2. Duplicate firstname, lastname, email inputs on customer account create frontendonly alphabet in firstname and lastname in customer registration form Magento 2How to show customer first name and last name after logged in Magento2.2.5?Spam account registrations, limiting characters in database not working
MinionPro is erroneous
Different inverter (logic gate) symbols
In a topological space if there exists a loop that cannot be contracted to a point does there exist a simple loop that cannot be contracted also?
Why does Intel's Haswell chip allow FP multiplication to be twice as fast as addition?
changing number of arguments to a function in secondary evaluation
Was the 2019 Lion King film made through motion capture?
Christian apologetics regarding the killing of innocent children during the Genesis flood
Write an interpreter for *
What happen to those who died but not from the snap?
Extremely casual way to make requests to very close friends
Blocking people from taking pictures of me with smartphone
How do I differentiate when a child LWC component is called twice in the parent component?
Does a code snippet compile? Or does it get compiled?
Infeasibility in mathematical optimization models
If "more guns less crime", how do gun advocates explain that the EU has less crime than the US?
The cat ate your input again!
Who are these characters/superheroes in the posters from Chris's room in Family Guy?
During the Space Shuttle Columbia Disaster of 2003, Why Did The Flight Director Say, "Lock the doors."?
Can a fight scene, component-wise, be too complex and complicated?
As a 16 year old, how can I keep my money safe from my mother?
(11 of 11: Meta) What is Pyramid Cult's All-Time Favorite?
What does this double-treble double-bass staff mean?
What are the conventions for transcribing Semitic languages into Greek?
Help evaluating integral (anything simple that I am missing?)
Limit customer firstname and lastname in m2
How to override .phtml files in Magento 2Added last name and search functionality in Customer GridWhy Magento ask First Name and Last Name?How to remove firstname, lastname validation (magento 1.9)How to post customer firstname & lastname into database magento 2.1.1?Magento 2 -Limit the length of the product name on the front end.Magento 2 Catch customer creation event on both frontend and adminMagento 2. Duplicate firstname, lastname, email inputs on customer account create frontendonly alphabet in firstname and lastname in customer registration form Magento 2How to show customer first name and last name after logged in Magento2.2.5?Spam account registrations, limiting characters in database not working
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
How can we limit the character of first name and last name of customer. For example I want only 30 characters are valid to enter in first & last name. As of now there is no limit on character we can add as many character we want.
Looking for advices
Thanks
magento2 customer customer-account magento2-enterprise name
|
show 2 more comments
How can we limit the character of first name and last name of customer. For example I want only 30 characters are valid to enter in first & last name. As of now there is no limit on character we can add as many character we want.
Looking for advices
Thanks
magento2 customer customer-account magento2-enterprise name
do you want to limit 30 character individually for first name and last name OR in combined name (first name + last name) ?
– Shashank Kumrawat
Oct 12 '18 at 13:14
yes individually
– Daniel_12
Oct 12 '18 at 13:14
for individual , you can use maxlength property of text field of first name and last name like this link
– Shashank Kumrawat
Oct 12 '18 at 13:16
no but how can we do this in magento 2. I am aware of maxlength="10" feature
– Daniel_12
Oct 12 '18 at 13:17
you need to override template filevendor/magento/module-customer/view/frontend/templates/widget/name.phtml
and need to put maxlength property there.
– Shashank Kumrawat
Oct 12 '18 at 13:23
|
show 2 more comments
How can we limit the character of first name and last name of customer. For example I want only 30 characters are valid to enter in first & last name. As of now there is no limit on character we can add as many character we want.
Looking for advices
Thanks
magento2 customer customer-account magento2-enterprise name
How can we limit the character of first name and last name of customer. For example I want only 30 characters are valid to enter in first & last name. As of now there is no limit on character we can add as many character we want.
Looking for advices
Thanks
magento2 customer customer-account magento2-enterprise name
magento2 customer customer-account magento2-enterprise name
asked Oct 12 '18 at 13:06
Daniel_12Daniel_12
3201 silver badge12 bronze badges
3201 silver badge12 bronze badges
do you want to limit 30 character individually for first name and last name OR in combined name (first name + last name) ?
– Shashank Kumrawat
Oct 12 '18 at 13:14
yes individually
– Daniel_12
Oct 12 '18 at 13:14
for individual , you can use maxlength property of text field of first name and last name like this link
– Shashank Kumrawat
Oct 12 '18 at 13:16
no but how can we do this in magento 2. I am aware of maxlength="10" feature
– Daniel_12
Oct 12 '18 at 13:17
you need to override template filevendor/magento/module-customer/view/frontend/templates/widget/name.phtml
and need to put maxlength property there.
– Shashank Kumrawat
Oct 12 '18 at 13:23
|
show 2 more comments
do you want to limit 30 character individually for first name and last name OR in combined name (first name + last name) ?
– Shashank Kumrawat
Oct 12 '18 at 13:14
yes individually
– Daniel_12
Oct 12 '18 at 13:14
for individual , you can use maxlength property of text field of first name and last name like this link
– Shashank Kumrawat
Oct 12 '18 at 13:16
no but how can we do this in magento 2. I am aware of maxlength="10" feature
– Daniel_12
Oct 12 '18 at 13:17
you need to override template filevendor/magento/module-customer/view/frontend/templates/widget/name.phtml
and need to put maxlength property there.
– Shashank Kumrawat
Oct 12 '18 at 13:23
do you want to limit 30 character individually for first name and last name OR in combined name (first name + last name) ?
– Shashank Kumrawat
Oct 12 '18 at 13:14
do you want to limit 30 character individually for first name and last name OR in combined name (first name + last name) ?
– Shashank Kumrawat
Oct 12 '18 at 13:14
yes individually
– Daniel_12
Oct 12 '18 at 13:14
yes individually
– Daniel_12
Oct 12 '18 at 13:14
for individual , you can use maxlength property of text field of first name and last name like this link
– Shashank Kumrawat
Oct 12 '18 at 13:16
for individual , you can use maxlength property of text field of first name and last name like this link
– Shashank Kumrawat
Oct 12 '18 at 13:16
no but how can we do this in magento 2. I am aware of maxlength="10" feature
– Daniel_12
Oct 12 '18 at 13:17
no but how can we do this in magento 2. I am aware of maxlength="10" feature
– Daniel_12
Oct 12 '18 at 13:17
you need to override template file
vendor/magento/module-customer/view/frontend/templates/widget/name.phtml
and need to put maxlength property there.– Shashank Kumrawat
Oct 12 '18 at 13:23
you need to override template file
vendor/magento/module-customer/view/frontend/templates/widget/name.phtml
and need to put maxlength property there.– Shashank Kumrawat
Oct 12 '18 at 13:23
|
show 2 more comments
2 Answers
2
active
oldest
votes
Try This Code
<input type="text" name="first name" id="first_name"
class="admin__control-text required-entry validate-alphanum-with-spaces validate-length maximum-length-30"
maxlength="30" />
whatever you want set input field length,set in maxlength attribute
add a comment |
You need to override core template file vendor/magento/module-customer/view/frontend/templates/widget/name.phtml
in your theme folder using this link -
How to override .phtml files in Magento 2
and need to put maxlength property in input
text field of first name and last name as suggested here.
https://www.w3schools.com/tags/att_input_maxlength.asp
hope this helps.
rakeshjesadiya.com/…
– Rakesh Jesadiya
Mar 5 at 8:13
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f246292%2flimit-customer-firstname-and-lastname-in-m2%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Try This Code
<input type="text" name="first name" id="first_name"
class="admin__control-text required-entry validate-alphanum-with-spaces validate-length maximum-length-30"
maxlength="30" />
whatever you want set input field length,set in maxlength attribute
add a comment |
Try This Code
<input type="text" name="first name" id="first_name"
class="admin__control-text required-entry validate-alphanum-with-spaces validate-length maximum-length-30"
maxlength="30" />
whatever you want set input field length,set in maxlength attribute
add a comment |
Try This Code
<input type="text" name="first name" id="first_name"
class="admin__control-text required-entry validate-alphanum-with-spaces validate-length maximum-length-30"
maxlength="30" />
whatever you want set input field length,set in maxlength attribute
Try This Code
<input type="text" name="first name" id="first_name"
class="admin__control-text required-entry validate-alphanum-with-spaces validate-length maximum-length-30"
maxlength="30" />
whatever you want set input field length,set in maxlength attribute
answered Oct 12 '18 at 13:21
Balwant SinghBalwant Singh
4341 gold badge3 silver badges16 bronze badges
4341 gold badge3 silver badges16 bronze badges
add a comment |
add a comment |
You need to override core template file vendor/magento/module-customer/view/frontend/templates/widget/name.phtml
in your theme folder using this link -
How to override .phtml files in Magento 2
and need to put maxlength property in input
text field of first name and last name as suggested here.
https://www.w3schools.com/tags/att_input_maxlength.asp
hope this helps.
rakeshjesadiya.com/…
– Rakesh Jesadiya
Mar 5 at 8:13
add a comment |
You need to override core template file vendor/magento/module-customer/view/frontend/templates/widget/name.phtml
in your theme folder using this link -
How to override .phtml files in Magento 2
and need to put maxlength property in input
text field of first name and last name as suggested here.
https://www.w3schools.com/tags/att_input_maxlength.asp
hope this helps.
rakeshjesadiya.com/…
– Rakesh Jesadiya
Mar 5 at 8:13
add a comment |
You need to override core template file vendor/magento/module-customer/view/frontend/templates/widget/name.phtml
in your theme folder using this link -
How to override .phtml files in Magento 2
and need to put maxlength property in input
text field of first name and last name as suggested here.
https://www.w3schools.com/tags/att_input_maxlength.asp
hope this helps.
You need to override core template file vendor/magento/module-customer/view/frontend/templates/widget/name.phtml
in your theme folder using this link -
How to override .phtml files in Magento 2
and need to put maxlength property in input
text field of first name and last name as suggested here.
https://www.w3schools.com/tags/att_input_maxlength.asp
hope this helps.
answered Oct 12 '18 at 13:45
Shashank KumrawatShashank Kumrawat
1,35813 silver badges47 bronze badges
1,35813 silver badges47 bronze badges
rakeshjesadiya.com/…
– Rakesh Jesadiya
Mar 5 at 8:13
add a comment |
rakeshjesadiya.com/…
– Rakesh Jesadiya
Mar 5 at 8:13
rakeshjesadiya.com/…
– Rakesh Jesadiya
Mar 5 at 8:13
rakeshjesadiya.com/…
– Rakesh Jesadiya
Mar 5 at 8:13
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f246292%2flimit-customer-firstname-and-lastname-in-m2%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
do you want to limit 30 character individually for first name and last name OR in combined name (first name + last name) ?
– Shashank Kumrawat
Oct 12 '18 at 13:14
yes individually
– Daniel_12
Oct 12 '18 at 13:14
for individual , you can use maxlength property of text field of first name and last name like this link
– Shashank Kumrawat
Oct 12 '18 at 13:16
no but how can we do this in magento 2. I am aware of maxlength="10" feature
– Daniel_12
Oct 12 '18 at 13:17
you need to override template file
vendor/magento/module-customer/view/frontend/templates/widget/name.phtml
and need to put maxlength property there.– Shashank Kumrawat
Oct 12 '18 at 13:23