How to set required Gender field in magento 2how to add “gender” resp. a salutation to customer address?Magento-2 : Display gender field as radio instead of dropdownMagento 2 remove class required in edit.phtmlHow to set default text field value in form Magento 2How to get customer gender options Magento 2One step checkout state field required issueHow to set ui form field value with url-param when loading edit new pageHow to get customer gender as text from its integer value in magento 2Add custom required field validation on checkout page Magento 2“Telephone” is a required value not working in customer edit form
Is Social Media Science Fiction?
I see my dog run
How is it possible for user's password to be changed after storage was encrypted? (on OS X, Android)
Why has Russell's definition of numbers using equivalence classes been finally abandoned? ( If it has actually been abandoned).
Can I interfere when another PC is about to be attacked?
Can Medicine checks be used, with decent rolls, to completely mitigate the risk of death from ongoing damage?
LED on same Pin as Toggle Switch, not illuminating
Example of a relative pronoun
N.B. ligature in Latex
Why are 150k or 200k jobs considered good when there are 300k+ births a month?
I’m planning on buying a laser printer but concerned about the life cycle of toner in the machine
Why is the design of haulage companies so “special”?
What are these boxed doors outside store fronts in New York?
Can you lasso down a wizard who is using the Levitate spell?
What do you call something that goes against the spirit of the law, but is legal when interpreting the law to the letter?
My colleague's body is amazing
Japan - Plan around max visa duration
declaring a variable twice in IIFE
What Brexit solution does the DUP want?
Is there a familial term for apples and pears?
whey we use polarized capacitor?
New order #4: World
How is the claim "I am in New York only if I am in America" the same as "If I am in New York, then I am in America?
A newer friend of my brother's gave him a load of baseball cards that are supposedly extremely valuable. Is this a scam?
How to set required Gender field in magento 2
how to add “gender” resp. a salutation to customer address?Magento-2 : Display gender field as radio instead of dropdownMagento 2 remove class required in edit.phtmlHow to set default text field value in form Magento 2How to get customer gender options Magento 2One step checkout state field required issueHow to set ui form field value with url-param when loading edit new pageHow to get customer gender as text from its integer value in magento 2Add custom required field validation on checkout page Magento 2“Telephone” is a required value not working in customer edit form
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I'm working with magento 2. when i want to set required for Gender field in Admin. It required me to config something.
magento2 magento-enterprise customer
bumped to the homepage by Community♦ yesterday
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I'm working with magento 2. when i want to set required for Gender field in Admin. It required me to config something.
magento2 magento-enterprise customer
bumped to the homepage by Community♦ yesterday
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
can you explain more?
– Ajay Patel
Apr 8 '16 at 4:47
I think it is asking to specify gender options. Magento does not know the values for gender dropdown automatically.
– Mohit Kumar Arora
May 9 '18 at 13:57
add a comment |
I'm working with magento 2. when i want to set required for Gender field in Admin. It required me to config something.
magento2 magento-enterprise customer
I'm working with magento 2. when i want to set required for Gender field in Admin. It required me to config something.
magento2 magento-enterprise customer
magento2 magento-enterprise customer
asked Apr 8 '16 at 4:09
ATTATT
285
285
bumped to the homepage by Community♦ yesterday
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ yesterday
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
can you explain more?
– Ajay Patel
Apr 8 '16 at 4:47
I think it is asking to specify gender options. Magento does not know the values for gender dropdown automatically.
– Mohit Kumar Arora
May 9 '18 at 13:57
add a comment |
can you explain more?
– Ajay Patel
Apr 8 '16 at 4:47
I think it is asking to specify gender options. Magento does not know the values for gender dropdown automatically.
– Mohit Kumar Arora
May 9 '18 at 13:57
can you explain more?
– Ajay Patel
Apr 8 '16 at 4:47
can you explain more?
– Ajay Patel
Apr 8 '16 at 4:47
I think it is asking to specify gender options. Magento does not know the values for gender dropdown automatically.
– Mohit Kumar Arora
May 9 '18 at 13:57
I think it is asking to specify gender options. Magento does not know the values for gender dropdown automatically.
– Mohit Kumar Arora
May 9 '18 at 13:57
add a comment |
2 Answers
2
active
oldest
votes
You have to add field with require as bellow.
for example in my custom module the field i have added in
CustomNewsBlockAdminhtmlItemsEditTabMain.php;
like
$fieldset->addField(
'news_short_description',
'editor',
[
'name' => 'news_short_description',
'label' => __('Short Description'),
'title' => __('Short Description'),
'class' => 'validate-length maximum-length-100',
'required' => true
]
);
or as like bellow
$fieldset->addField(
'news_content',
'editor',
[
'name' => 'news_content',
'label' => __('Long Description'),
'title' => __('Long Description'),
'style' => 'height:11em',
'required' => true,
'disabled' => $isElementDisabled,
'config' => $wysiwygConfig
//'config' => $wysiwygConfig
]
);
$dateFormat = $this->_localeDate->getDateFormat(IntlDateFormatter::SHORT);
$timeFormat = $this->_localeDate->getTimeFormat(IntlDateFormatter::SHORT);
$style = 'color: #000;background-color: #fff; font-weight: bold; font-size: 13px;';
$fieldset->addField(
'start_time',
'date',
[
'name' => 'start_time',
'label' => __('Starting time'),
'title' => __('Starting time'),
'required' => true,
'readonly' => true,
'style' => $style,
'class' => 'required-entry',
'date_format' => $dateFormat,
'time_format' => $timeFormat,
]
);
I hope this will help you.
tks u, i'll try it.
– ATT
Apr 10 '16 at 14:50
MWC...i hope this will help you.
– denish vachhani
Apr 11 '16 at 6:55
add a comment |
I think it is asking to specify gender options. Magento does not know the values for gender dropdown automatically.
You just have to specify values for the gender dropdown.
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%2f110045%2fhow-to-set-required-gender-field-in-magento-2%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
You have to add field with require as bellow.
for example in my custom module the field i have added in
CustomNewsBlockAdminhtmlItemsEditTabMain.php;
like
$fieldset->addField(
'news_short_description',
'editor',
[
'name' => 'news_short_description',
'label' => __('Short Description'),
'title' => __('Short Description'),
'class' => 'validate-length maximum-length-100',
'required' => true
]
);
or as like bellow
$fieldset->addField(
'news_content',
'editor',
[
'name' => 'news_content',
'label' => __('Long Description'),
'title' => __('Long Description'),
'style' => 'height:11em',
'required' => true,
'disabled' => $isElementDisabled,
'config' => $wysiwygConfig
//'config' => $wysiwygConfig
]
);
$dateFormat = $this->_localeDate->getDateFormat(IntlDateFormatter::SHORT);
$timeFormat = $this->_localeDate->getTimeFormat(IntlDateFormatter::SHORT);
$style = 'color: #000;background-color: #fff; font-weight: bold; font-size: 13px;';
$fieldset->addField(
'start_time',
'date',
[
'name' => 'start_time',
'label' => __('Starting time'),
'title' => __('Starting time'),
'required' => true,
'readonly' => true,
'style' => $style,
'class' => 'required-entry',
'date_format' => $dateFormat,
'time_format' => $timeFormat,
]
);
I hope this will help you.
tks u, i'll try it.
– ATT
Apr 10 '16 at 14:50
MWC...i hope this will help you.
– denish vachhani
Apr 11 '16 at 6:55
add a comment |
You have to add field with require as bellow.
for example in my custom module the field i have added in
CustomNewsBlockAdminhtmlItemsEditTabMain.php;
like
$fieldset->addField(
'news_short_description',
'editor',
[
'name' => 'news_short_description',
'label' => __('Short Description'),
'title' => __('Short Description'),
'class' => 'validate-length maximum-length-100',
'required' => true
]
);
or as like bellow
$fieldset->addField(
'news_content',
'editor',
[
'name' => 'news_content',
'label' => __('Long Description'),
'title' => __('Long Description'),
'style' => 'height:11em',
'required' => true,
'disabled' => $isElementDisabled,
'config' => $wysiwygConfig
//'config' => $wysiwygConfig
]
);
$dateFormat = $this->_localeDate->getDateFormat(IntlDateFormatter::SHORT);
$timeFormat = $this->_localeDate->getTimeFormat(IntlDateFormatter::SHORT);
$style = 'color: #000;background-color: #fff; font-weight: bold; font-size: 13px;';
$fieldset->addField(
'start_time',
'date',
[
'name' => 'start_time',
'label' => __('Starting time'),
'title' => __('Starting time'),
'required' => true,
'readonly' => true,
'style' => $style,
'class' => 'required-entry',
'date_format' => $dateFormat,
'time_format' => $timeFormat,
]
);
I hope this will help you.
tks u, i'll try it.
– ATT
Apr 10 '16 at 14:50
MWC...i hope this will help you.
– denish vachhani
Apr 11 '16 at 6:55
add a comment |
You have to add field with require as bellow.
for example in my custom module the field i have added in
CustomNewsBlockAdminhtmlItemsEditTabMain.php;
like
$fieldset->addField(
'news_short_description',
'editor',
[
'name' => 'news_short_description',
'label' => __('Short Description'),
'title' => __('Short Description'),
'class' => 'validate-length maximum-length-100',
'required' => true
]
);
or as like bellow
$fieldset->addField(
'news_content',
'editor',
[
'name' => 'news_content',
'label' => __('Long Description'),
'title' => __('Long Description'),
'style' => 'height:11em',
'required' => true,
'disabled' => $isElementDisabled,
'config' => $wysiwygConfig
//'config' => $wysiwygConfig
]
);
$dateFormat = $this->_localeDate->getDateFormat(IntlDateFormatter::SHORT);
$timeFormat = $this->_localeDate->getTimeFormat(IntlDateFormatter::SHORT);
$style = 'color: #000;background-color: #fff; font-weight: bold; font-size: 13px;';
$fieldset->addField(
'start_time',
'date',
[
'name' => 'start_time',
'label' => __('Starting time'),
'title' => __('Starting time'),
'required' => true,
'readonly' => true,
'style' => $style,
'class' => 'required-entry',
'date_format' => $dateFormat,
'time_format' => $timeFormat,
]
);
I hope this will help you.
You have to add field with require as bellow.
for example in my custom module the field i have added in
CustomNewsBlockAdminhtmlItemsEditTabMain.php;
like
$fieldset->addField(
'news_short_description',
'editor',
[
'name' => 'news_short_description',
'label' => __('Short Description'),
'title' => __('Short Description'),
'class' => 'validate-length maximum-length-100',
'required' => true
]
);
or as like bellow
$fieldset->addField(
'news_content',
'editor',
[
'name' => 'news_content',
'label' => __('Long Description'),
'title' => __('Long Description'),
'style' => 'height:11em',
'required' => true,
'disabled' => $isElementDisabled,
'config' => $wysiwygConfig
//'config' => $wysiwygConfig
]
);
$dateFormat = $this->_localeDate->getDateFormat(IntlDateFormatter::SHORT);
$timeFormat = $this->_localeDate->getTimeFormat(IntlDateFormatter::SHORT);
$style = 'color: #000;background-color: #fff; font-weight: bold; font-size: 13px;';
$fieldset->addField(
'start_time',
'date',
[
'name' => 'start_time',
'label' => __('Starting time'),
'title' => __('Starting time'),
'required' => true,
'readonly' => true,
'style' => $style,
'class' => 'required-entry',
'date_format' => $dateFormat,
'time_format' => $timeFormat,
]
);
I hope this will help you.
answered Apr 8 '16 at 4:57
denish vachhanidenish vachhani
3,36511038
3,36511038
tks u, i'll try it.
– ATT
Apr 10 '16 at 14:50
MWC...i hope this will help you.
– denish vachhani
Apr 11 '16 at 6:55
add a comment |
tks u, i'll try it.
– ATT
Apr 10 '16 at 14:50
MWC...i hope this will help you.
– denish vachhani
Apr 11 '16 at 6:55
tks u, i'll try it.
– ATT
Apr 10 '16 at 14:50
tks u, i'll try it.
– ATT
Apr 10 '16 at 14:50
MWC...i hope this will help you.
– denish vachhani
Apr 11 '16 at 6:55
MWC...i hope this will help you.
– denish vachhani
Apr 11 '16 at 6:55
add a comment |
I think it is asking to specify gender options. Magento does not know the values for gender dropdown automatically.
You just have to specify values for the gender dropdown.
add a comment |
I think it is asking to specify gender options. Magento does not know the values for gender dropdown automatically.
You just have to specify values for the gender dropdown.
add a comment |
I think it is asking to specify gender options. Magento does not know the values for gender dropdown automatically.
You just have to specify values for the gender dropdown.
I think it is asking to specify gender options. Magento does not know the values for gender dropdown automatically.
You just have to specify values for the gender dropdown.
answered May 9 '18 at 13:58
Mohit Kumar AroraMohit Kumar Arora
6,77251633
6,77251633
add a comment |
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%2f110045%2fhow-to-set-required-gender-field-in-magento-2%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
can you explain more?
– Ajay Patel
Apr 8 '16 at 4:47
I think it is asking to specify gender options. Magento does not know the values for gender dropdown automatically.
– Mohit Kumar Arora
May 9 '18 at 13:57