I am creating an app which duplicates an existing paper-based transaction into a SQL Server database.
It is partially successful.
When I click a button to add a new record, a new record is allocated, and a form appears with no values, ready for input. When I click the "Save" button on the window after filling in data values, the values that were entered into text fields are saved to the new record in the database.
However, the form also contains a sequence of two Radio buttons. How do I reflect the Radio button selection in a boolean field within the new record? Anytime I recall a saved record, all text fields have their saved values, but none of the option Radio buttons are selected.
This question deals with the same project I previously asked about, with respect to checkboxes which exist on the form.
There are several parts to the transaction, each of which must be completed by different parties, so I have split the form app into multiple windows, each containing only the fields for that party's portion of the transaction.
Again, the record creation, retrieval, and update all work perfectly, except for storing non-text input.
Thank you very much for any help you can offer!
Below are a sample of the successful Text input, followed by my attempt at the RadioGroup:
<div class="form-cell">
<label for="comments">Comments</label><br>
@Helpers.FormField.Textarea.Enabled("comments", r1.Comments, 500)
</div>
<div class="form-cell" id="toggle_partIValidation">
<label for="PartIValidation">VALIDATION</label><br>
<div class="form-cell" id="toggle_partIValidation">
@Helpers.FormField.Radio.Enabled("PartIValidation", "V", "Validated", (r1.Part1Validation == "V" ? true : false))
@Helpers.FormField.Radio.Enabled("PartIValidation", "D", "Disapproved", (r1.Part1Validation == "D" ? true : false))
@Helpers.FormField.Radio.Enabled("PartIValidation", "R", "Returned", (r1.Part1Validation == "R" ? true : false))
</div>
</div>