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

Why are electrically insulating heatsinks so rare? Is it just cost?

Watching something be written to a file live with tail

Why Is Death Allowed In the Matrix?

How do I create uniquely male characters?

"You are your self first supporter", a more proper way to say it

What does "Puller Prush Person" mean?

Can divisibility rules for digits be generalized to sum of digits

Why did the Germans forbid the possession of pet pigeons in Rostov-on-Don in 1941?

Why are 150k or 200k jobs considered good when there are 300k+ births a month?

Maximum likelihood parameters deviate from posterior distributions

What would happen to a modern skyscraper if it rains micro blackholes?

Mage Armor with Defense fighting style (for Adventurers League bladeslinger)

The use of multiple foreign keys on same column in SQL Server

Why did Neo believe he could trust the machine when he asked for peace?

In Japanese, what’s the difference between “Tonari ni” (となりに) and “Tsugi” (つぎ)? When would you use one over the other?

Theorems that impeded progress

What are these boxed doors outside store fronts in New York?

To string or not to string

Why doesn't Newton's third law mean a person bounces back to where they started when they hit the ground?

Email Account under attack (really) - anything I can do?

Why does Kotter return in Welcome Back Kotter?

What does it mean to describe someone as a butt steak?

How to format long polynomial?

What defenses are there against being summoned by the Gate spell?



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;








1















I'm working with magento 2. when i want to set required for Gender field in Admin. It required me to config something.
This picture describes my problem










share|improve this question














bumped to the homepage by Community 1 hour ago


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

















1















I'm working with magento 2. when i want to set required for Gender field in Admin. It required me to config something.
This picture describes my problem










share|improve this question














bumped to the homepage by Community 1 hour ago


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













1












1








1








I'm working with magento 2. when i want to set required for Gender field in Admin. It required me to config something.
This picture describes my problem










share|improve this question














I'm working with magento 2. when i want to set required for Gender field in Admin. It required me to config something.
This picture describes my problem







magento2 magento-enterprise customer






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Apr 8 '16 at 4:09









ATTATT

285




285





bumped to the homepage by Community 1 hour ago


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 1 hour ago


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

















  • 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










2 Answers
2






active

oldest

votes


















0














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.






share|improve this answer























  • 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


















0














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.






share|improve this answer























    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
    );



    );













    draft saved

    draft discarded


















    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









    0














    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.






    share|improve this answer























    • 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















    0














    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.






    share|improve this answer























    • 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













    0












    0








    0







    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.






    share|improve this answer













    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.







    share|improve this answer












    share|improve this answer



    share|improve this answer










    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

















    • 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













    0














    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.






    share|improve this answer



























      0














      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.






      share|improve this answer

























        0












        0








        0







        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.






        share|improve this answer













        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.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered May 9 '18 at 13:58









        Mohit Kumar AroraMohit Kumar Arora

        6,77251633




        6,77251633



























            draft saved

            draft discarded
















































            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.




            draft saved


            draft discarded














            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





















































            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







            Popular posts from this blog

            Can not update quote_id field of “quote_item” table magento 2Magento 2.1 - We can't remove the item. (Shopping Cart doesnt allow us to remove items before becomes empty)Add value for custom quote item attribute using REST apiREST API endpoint v1/carts/cartId/items always returns error messageCorrect way to save entries to databaseHow to remove all associated quote objects of a customer completelyMagento 2 - Save value from custom input field to quote_itemGet quote_item data using quote id and product id filter in Magento 2How to set additional data to quote_item table from controller in Magento 2?What is the purpose of additional_data column in quote_item table in magento2Set Custom Price to Quote item magento2 from controller

            How to solve knockout JS error in Magento 2 Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?(Magento2) knockout.js:3012 Uncaught ReferenceError: Unable to process bindingUnable to process binding Knockout.js magento 2Cannot read property `scopeLabel` of undefined on Product Detail PageCan't get Customer Data on frontend in Magento 2Magento2 Order Summary - unable to process bindingKO templates are not loading in Magento 2.1 applicationgetting knockout js error magento 2Product grid not load -— Unable to process binding Knockout.js magento 2Product form not loaded in magento2Uncaught ReferenceError: Unable to process binding “if: function()return (isShowLegend()) ” magento 2

            Nissan Patrol Зміст Перше покоління — 4W60 (1951-1960) | Друге покоління — 60 series (1960-1980) | Третє покоління (1980–2002) | Четверте покоління — Y60 (1987–1998) | П'яте покоління — Y61 (1997–2013) | Шосте покоління — Y62 (2010- ) | Посилання | Зноски | Навігаційне менюОфіційний український сайтТест-драйв Nissan Patrol 2010 7-го поколінняNissan PatrolКак мы тестировали Nissan Patrol 2016рвиправивши або дописавши її