kitchen-site icon indicating copy to clipboard operation
kitchen-site copied to clipboard

An invalid form control with name='partnerModelId' is not focusable.

Open Fr33maan opened this issue 9 years ago • 3 comments

Hi @perak,

I'm actually trying to hide an input in an insert form because it must be auto-incremented and not editable by the user.

I've set the Input group class with a{display: hidden} class but now I cannot insert elements in the collection.

If I set the the element to read-only, the attribute is not inserted in the collection.

Fr33maan avatar Jul 19 '16 10:07 Fr33maan

@l1br3 see can you use form's hidden_fields property.

perak avatar Jul 19 '16 11:07 perak

BTW, better practice is to set auto increment fields in Collection before.insert hook ( before_insert_code ) at server side, not in forms.

perak avatar Jul 19 '16 11:07 perak

I didn't success put helper variable in hidden field, maybe I just did it in the wrong way ?

I'm going to look at the second solution too.

Thanks

Fr33maan avatar Jul 19 '16 13:07 Fr33maan