• Resolved just10mninutes

    (@just10mninutes)


    Hi,

    Thank you for this wonderful plugin.

    Could you please assist me how to make select field as required/mandatory field?

    [md-select label=”Which session would you like to join?”]
    [select menu-1 “07th October 2017” “14th October 2017” “21st October 2017” “28th October 2017”]
    [/md-select]

    I tried select* but looks like it does not consider this * for select field.

    Thanks

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author GusRuss89

    (@gusruss89)

    Hi @just10mninutes

    You just need to include a blank option – otherwise your select field will select “07th October 2017” as the value, meaning it can never be blank, and won’t trigger a required field rule.

    Your code should be:

    [md-select label=”Which session would you like to join?”]
    [select menu-1 include_blank “07th October 2017” “14th October 2017” “21st October 2017” “28th October 2017”]
    [/md-select]

    Thanks,
    Angus

    Thread Starter just10mninutes

    (@just10mninutes)

    @angus,

    Thank you for your response. looks like you misread my question or I am understanding your answer incorrectly.

    I want that this field should be mandatory and not including blank. so I do not want to include include_blank option.

    Regarding your point

    otherwise your select field will select “07th October 2017” as the value, meaning it can never be blank

    In this case I get my field label(Which session would you like to join?) as menu-1 value when the form gets submitted and email is sent

    [md-select label="Which session would you like to join?"]
    [select menu-1 "07th October 2017" "14th October 2017" "21st October 2017" "28th October 2017"]
    [/md-select]
    

    Please let me know if I am not clear with my question.

    Thank You

    Plugin Author GusRuss89

    (@gusruss89)

    Hi @just10mninutes

    Mandatory/required literally means “not blank”. If you don’t add include_blank to your field, then it can never be blank, which means it doesn’t make sense for the field to be mandatory/required.

    In other words, if you don’t add include_blank and someone fills out the form but leaves the select field, it will still have a value (not blank) – which in your case is “07th October 2017”.

    Let me know if I’m still misinterpreting your question.

    Thanks,
    Angus

    Thread Starter just10mninutes

    (@just10mninutes)

    @angus,

    I understood your point of making select field as mandatory or non-mandatory.

    Now what I am trying to say is, when I make the field as mandatory and person does not select the option, the form sends email with select field label value instead of first option of menu.

    Below is the sample email received after filling form. I was expecting to receive 07th October 2017 in front of Workshop Date: since user did not select any option.

    Hi Team,

    We have a new Registration for the workshop

    WorkShop Date : Which session would you like to join?
    Name : tre
    Email : <[email protected]>
    Contact Number: 3456

    Thank you

    Plugin Author GusRuss89

    (@gusruss89)

    Hi @just10mninutes

    I see your problem now. You found a bug. I’ve updated the plugin with a fix, please update and let me know if your problem is resolved.

    Thanks,
    Angus

    Thread Starter just10mninutes

    (@just10mninutes)

    @angus,

    Just updated and verified, no changes in the behavior.

    I still get the label as menu value.

    Thanks

    Plugin Author GusRuss89

    (@gusruss89)

    Hi @just10mninutes

    Do you have a live url I can see your form at?

    Thanks,
    Angus

    Thread Starter just10mninutes

    (@just10mninutes)

    @angus,

    Here is the link.

    https://olifant.co.za/datansh/popi-compliance/

    Form is available under register tab.

    Note: The site is still under construction.

    If you register you will get the email with the details which has been submitted.

    Thank you

    Plugin Author GusRuss89

    (@gusruss89)

    Hi @just10mninutes

    It doesn’t look like it’s currently set to mandatory, but when I filled out the form and left that field blank, I got a blank field in the email (not “Which session would you like to join?”), which seems correct.

    You may just need to clear your browser’s cache and retry. Can you let me know if that fixes the problem?

    https://www.refreshyourcache.com/en/home/

    Thanks,
    Angus

    Thread Starter just10mninutes

    (@just10mninutes)

    @angus,

    You are right, i had not put select*.

    Now everything is fine.

    Thanks a lot for your support

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Making Select field mandatory’ is closed to new replies.