Can I read an attribute from a form element?
I got it:
<input class="number required" min="1250" max="999999999" id="insert_counter1" name="my_counter" value="" type="text">
After submitting, I can access the value. But is there a way to get other attributes like min or max?
Right now I have a hidden read-only input field named my_counter_min, where the attribute "min" is stored. I don't know if this work works or not, this is the only way to do it.
Br. Anders
UPDATED based on the answers below:
Thanks for the good feedback. When I read the answers, there are three good solutions with some pros and cons.
- Save value in input type = hidden. Easy to do, but fake
- Use a parser. It takes more time for the code, but the original value will be obtained through a new web request. So no fakes
- . rcord , , allready ( ).
. , , .
BR.