You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 12, 2021. It is now read-only.
I'm using simple_nested_form_for to build a form with nested fields. When I press submit, I get the correct params hash, and validation seems to work. When after some validations do not pass I re-render the form via the create action, however, the nested fields are displayed incorrectly. The same nested fields are shown multiple times.
Also, in my simple_fields_for the FormBuilderindex is shown as a semi random number such as 1454793731550, whereas after re-rendering it is displayed in normal increments 0-n.
The text was updated successfully, but these errors were encountered:
@Mingus85 Can you please share your code?. especially, the create action of the controller. It is just to know what you are exactly trying to do.
And the last part is because , Using the nested form, we add fields dynamically, so for the first time when form is rendered, we donot initialize any objects of the child class. The FormBuilder object is yielded when usingform_for or fields_for. and When these values are submitted to server, we initialize objects so next time when it is re-render it is displayed with its object ids.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'm using
simple_nested_form_for
to build a form with nested fields. When I press submit, I get the correct params hash, and validation seems to work. When after some validations do not pass I re-render the form via thecreate
action, however, the nested fields are displayed incorrectly. The same nested fields are shown multiple times.Also, in my
simple_fields_for
theFormBuilder
index
is shown as a semi random number such as1454793731550
, whereas after re-rendering it is displayed in normal increments0-n
.The text was updated successfully, but these errors were encountered: