Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi Guys,
I have a property editor with a dynamic input. I have set the input to be required and works has it should when you click save in the back office.
However, the required text is always showing, before I click save.
I use the built-in help tags:
<input class="umb-editor umb-textstring" type="{{field.templateOptions.type}}" ng-attr-name="{{field.key}}" ng-model="model.value[field.key]" placeholder="{{field.templateOptions.placeholder}}" ng-required="{{field.templateOptions.required}}"> <span class="help-inline" val-msg-for="{{field.key}}" val-toggle-msg="required">Required</span>
How do I hide the 'required' text initial?
Thanks
Darren
Hi Darren,
I was comparing your code with mine and the only thing that is different is the ng-attr-name="{{field.key}}" which is at my side name="{{field.key}}".
ng-attr-name="{{field.key}}"
name="{{field.key}}"
Not sure if that could be the reason but its worth a shot!
Hope this helps.
/Michaël
Hi Michaël,
Thanks for your reply, however it didn't work. The problem seems to be using dynamic field names.
If I set the name to:
name="name"
This works, however every form field is named 'name'.
I may have to look for alternative work around, thanks again.
could you have a look at this thread on stackoverflow:
https://stackoverflow.com/questions/27071413/dynamic-form-name-attribute-input-type-text-name-variable-name-in
Maybe this can help you.
Thanks for the link, I've taken at look at this and I think the underlying problem is the version of angularjs in umbraco (currently using 1.1.5).
Someone mentions this was fixed in version 1.3.0, so I don't know if its possible to upgrade the version of angularjs in umbraco?
you are correct about the Angular version part, but it won't be possible to upgrade the version of Angular inside Umbraco.
The part of creating a new custom directive could that be a solution?
Thanks again, I'm going to implement a new directive :)
I'll come back to you and let you know how I get on
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Custom Property Editor - required field always showing
Hi Guys,
I have a property editor with a dynamic input. I have set the input to be required and works has it should when you click save in the back office.
However, the required text is always showing, before I click save.
I use the built-in help tags:
How do I hide the 'required' text initial?
Thanks
Darren
Hi Darren,
I was comparing your code with mine and the only thing that is different is the
ng-attr-name="{{field.key}}"
which is at my sidename="{{field.key}}"
.Not sure if that could be the reason but its worth a shot!
Hope this helps.
/Michaël
Hi Michaël,
Thanks for your reply, however it didn't work. The problem seems to be using dynamic field names.
If I set the name to:
This works, however every form field is named 'name'.
I may have to look for alternative work around, thanks again.
Darren
Hi Darren,
could you have a look at this thread on stackoverflow:
https://stackoverflow.com/questions/27071413/dynamic-form-name-attribute-input-type-text-name-variable-name-in
Maybe this can help you.
/Michaël
Hi Michaël,
Thanks for the link, I've taken at look at this and I think the underlying problem is the version of angularjs in umbraco (currently using 1.1.5).
Someone mentions this was fixed in version 1.3.0, so I don't know if its possible to upgrade the version of angularjs in umbraco?
Darren
Hi Darren,
you are correct about the Angular version part, but it won't be possible to upgrade the version of Angular inside Umbraco.
The part of creating a new custom directive could that be a solution?
Hope this helps.
/Michaël
Hi Michaël,
Thanks again, I'm going to implement a new directive :)
I'll come back to you and let you know how I get on
Darren
is working on a reply...