Auto fill form that uses an enumeration

0
I have a form that pulls data from 5 different entities that make up a Zoom meeting (around 15 to 20 fields) For the edit page, I am populating the fields with the last state of the meeting. This is done with a couple of microflows that retrieves the data needed. There is some logic that is used to validate what type and where to find the data so the entities that are returned are populated correctly. I currently am able to populate all of the fields except one that uses an enumeration with radio buttons to make the selection. I have no idea how to set the state of the enumeration for when the form is populated. How would I got about automatically setting the state of the radio buttons for the enumeration? I have other radio buttons that are populating correctly because they are simply booleans attributes that it is reading and setting. I guess what I am really looking for here is, how can I compare a previously known state, in this case there is another attribute (string) that knows what selection was made as it is set with the selection when the Zoom meeting is created, how can I compare that value against the enumeration attribute, which is displayed on the edit screen, ‘set’ (whatever that means in this context) the enumeration value, and then have that value be the selected value when the form is rendered to the screen?   Thanks!! Edit: I have included some pictures to show what I mean:   When a new meeting is created, I have these options set. Once I have set everything, I have a save button that creates the request through the Zoom API to create a new meeting and then I parse the response into a ZoomMeeting object. When I need to edit it though, instead of getting my options set back to the above, I get the following: All the options get set correctly except the Audio option. That then defaults back to having ‘Both’ selected. I am guessing that is the default option on the entity (I did not create the Zoom module, my coworker did but I am integrating it into the application we are building). The Audio attribute is of type enumeration as seen in the following entity as audio_type_enum: The type defaults to ‘Both’ but on edit, I need it to to populate as what was previously there (which is set and known from the audio string attribute).
asked
1 answers
0

Hi Jonathan, 

Looks like the module that you are using is not considering the audio attribute you are sending from your form and defaulting it to some value.

I will try suggesting two options:

1. If it is a app store widget, you could create a custom module for that app store module and try with a new entity that is inheriting the domain entity from app store module. Or also check which Microflow is actually processing it, so you can mend that microflow in your custom module to your needs. Changing app store module directly is not right solution.

2. If you are saving the form some where in your own domain model probably on receiving the response you could reset it with the option you choose. If you are using import_mapping you can use converters also to do this.

Hope this helps.

Regards,

Nirmal

answered