- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2024 07:17 AM
When one select box value is selected, the other select box values in the table are changed. Is there anything wrong with the code?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2024 01:00 PM
I'm assuming you want to prevent submission functionality if the required fields are not filled?
You need to add a name attribute to the form
<form name="formName">
Then check if the form is valid (all required fields are met) when the submit button is clicked
<button class="test" class="btn btn-primary btn-block" ng-click="c.uiAction('remove')" ng-disabled="formName.$invalid">Keep All</button>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2024 11:04 AM
You are right.I missed that :(. I appreciate all your help, and thanks for routing me in the right direction 🙂
These tips will help me build a widget without error in the future.
Sorry for asking too many questions. One last question. ng-required="true" is not working in the HTML part. I have already shared the code in the HTML part above. If it's not clear, I can share it again. Please let me know
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2024 01:00 PM
I'm assuming you want to prevent submission functionality if the required fields are not filled?
You need to add a name attribute to the form
<form name="formName">
Then check if the form is valid (all required fields are met) when the submit button is clicked
<button class="test" class="btn btn-primary btn-block" ng-click="c.uiAction('remove')" ng-disabled="formName.$invalid">Keep All</button>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2024 02:55 PM
Thank you so much @TFischer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2024 09:35 AM
@TFischer I for got to ask you about this.
"Here we are binding a unique value for all inputs per row. This will likely cause a new console error such as "c.data.manager_action is undefined" but we can fix that by mapping a manager_action key to your data object on the server script. I can help you if you see an error and share your server script."
How do you get the value of each row in the client script? It helps to update all the values to 'Keep' when the 'Keep All ' option is selected.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2024 11:57 AM
It depends on the data structure of your array in your ng-repeat. You will most likely want to store the value of the action as a key on every individual object in that array. Then you can update all object when "Keep All" is selected.