Open Closed

Binding bool value to phonebook - mvc core - jquery #3423


0
mdonogma created

trying to add a boolean value to the phonebook example so that checked/unchecked can pass through to the CreatePerson.

class on html: <div class="md-checkbox">

please help? as the rest of your app does not follow the same pattern as phonebook example.


1 Answer(s)
  • 0
    alirizaadiyahsi created

    Hi,

    Actually, there are examples in application. For example Tenants/_CreateModal.cshtml You can refer this page.

    For phonebook example:

    • Add a boolean value to CreatePersonInput.cs
    • Add a checkbox item to view. Like following:
    <div class="md-checkbox">
        <input id="Phonebook_SomeBooleanValue" class="md-check" type="checkbox" name="SomeBooleanValue" value="true" checked="checked">
        <label for="Phonebook_SomeBooleanValue">
            <span class="inc"></span>
            <span class="check"></span>
            <span class="box"></span>
                @L("SomeBooleanValue")
            </label>
     </div>