Page 1 of 1
CheckBoxList Controller Parameters
Posted: June 14th, 2022, 3:59 pm
by Filip.Serw
In MVC, I have a controller parameter that references a field checkboxlist. The text and values properties of that checkboxlist are populated by a NameValueCollection. The controller is associated with a button, so when the button is clicked I can generate logs.
- Controller Popup settings
- Webpage setup
When testing and checking the logs, the controller parameters that are sent through are all the values from the checkboxlist where I would like for only selected values to be sent. For the value attribute, I left blank. The controller parameter is also not set up as an array.
- Parameter logs
Is there a way to make it so only the selected values from the checkboxlist are sent as controller parameters?
The interntal team has replied that this can be done only by Javascript, but should be workable through the controller pop up parameters.
Re: CheckBoxList Controller Parameters
Posted: June 20th, 2022, 1:10 pm
by Filip.Serw
There was an update to allow the inclusion of checked as a parameter to be passed into the controller. After setting it up as the first image I gave it a test. The results of the test show in the logs in the bottom image. All values are passed and all checked values are passed but they are not associated together. This makes it difficult to put them together, but if the values and checked were passed together under a Result node, it would help that they are grouped such that each checked value corresponds to each value.
<Result>
<Value>
<Checked>
</Result>
etc
Or when passing values into the, only send the values that are true.
Re: CheckBoxList Controller Parameters
Posted: May 22nd, 2023, 8:47 am
by JustinVanRegenmorter
In the latest EASYProcess version, Controllers now have the ability to mark a parameter as a checkbox list.
- CheckBoxList Controller.png (10.83 KiB) Viewed 2429 times
- CheckBoxList Controller.png (10.83 KiB) Viewed 2429 times
The children of this parameter can be set to the attributes like Value or Checked.
The output of the CheckBoxList in a controller is now grouped and easily accessible.
- CheckBoxList Output.png (12.9 KiB) Viewed 2429 times
- CheckBoxList Output.png (12.9 KiB) Viewed 2429 times
For more information on CheckBoxList in parameters please check out the dedicated
forum post for this feature.