Closed e00dan closed 12 months ago
Actually, this works:
{{#em-form model=model submit_button=false}}
{{em-input property="name" label="Nazwa konta" placeholder="Podaj nazwę"}}
{{em-input property="email" label="E-mail" placeholder="Podaj e-mail"}}
{{em-input property="password" label="Hasło" placeholder="Podaj hasło" type="password" disabled=model.nameAndEmailFilled}}
{{em-select property="profile.gender" label="Płeć" prompt="Wybierz" contentBinding="model.profile.genderOptions" optionValuePath="content.id" optionLabelPath="content.name"}}
{{em-checkbox property="rulesAccept" label="Akceptacja regulaminu"}}
<div class="form-actions">
<input {{bind-attr disabled=model.isntValid}} {{action 'register'}} type="submit" class="btn btn-default" value="Zarejestruj się"/>
</div>
{{/em-form}}
{{#em-form model=model.profile submit_button=false}}
{{em-input property="firstName" label="Imię" placeholder="Podaj imię"}}
{{/em-form}}
But how to use em-input for model.profile.firstName without using second em-form and passing model.profile as it's model?
+1. nested models would be a super feature
Validation doesn't work if using 2 em-forms in 1 template. Using model for first model and model.profile for second(user belongs to profile and vice versa). Neither using eg.
{{em-input property="profile.firstName"}}
. However, values are getting correctly populated here. Only validations doesn't work. My profile model: