I have a couple of fields on a DynamicForm (TextItem and CheckboxItem) that I want to put close together so that the CheckboxItem appears just to the right of the TextItem. There are other fields on the form, but I want these two to essentially take up the same space as one field.
I created a second small DynamicForm with just those two items on it and then created a CanvasItem with the small form as it's Canvas. I then put the CanvasItem on the main form where the two fields were originally and set colSpan="2". I add both forms as members to the same ValuesManager (which also happens to have other forms associated with it). The CanvasItem works fine to get the layout I want.
The problem is that the TextItem is required="true". When I edit an existing record that has a value in the TextItem the value shows up on the form, but it does not pass validation. I get a validation error that the field is required when it clearly has a value in it. Same when editing a new record and typing something into the required field. I've double checked that both forms belong to the same values manager. If I dispense with the CanvasItem and put the two fields back onto the main form everything works fine.
Am I using the right approach or is there a better alternative? It seems like a bug with the ValuesManager and CanvasItem.
I created a second small DynamicForm with just those two items on it and then created a CanvasItem with the small form as it's Canvas. I then put the CanvasItem on the main form where the two fields were originally and set colSpan="2". I add both forms as members to the same ValuesManager (which also happens to have other forms associated with it). The CanvasItem works fine to get the layout I want.
The problem is that the TextItem is required="true". When I edit an existing record that has a value in the TextItem the value shows up on the form, but it does not pass validation. I get a validation error that the field is required when it clearly has a value in it. Same when editing a new record and typing something into the required field. I've double checked that both forms belong to the same values manager. If I dispense with the CanvasItem and put the two fields back onto the main form everything works fine.
Am I using the right approach or is there a better alternative? It seems like a bug with the ValuesManager and CanvasItem.
Comment