This will likely always return the very first value out of the available radio options, regardless of which one is selected.
The reason is that input[name="credit_score"] matches every single radio option, as each option has the same name attribute, so it just returns the first one it sees.
You could try using something that looks for whether the input is selected, i.e.
('input[name="credit_score"]:checked')
Hope this helps!
✔️ Did this post help answer your query? Help the community by marking it as a solution.
This will likely always return the very first value out of the available radio options, regardless of which one is selected.
The reason is that input[name="credit_score"] matches every single radio option, as each option has the same name attribute, so it just returns the first one it sees.
You could try using something that looks for whether the input is selected, i.e.
('input[name="credit_score"]:checked')
Hope this helps!
✔️ Did this post help answer your query? Help the community by marking it as a solution.