Really need to set value in hidden field programatically
See original GitHub issueHi there, i can not find a way to set a value in a field, it is no bound to any onChange event, i just need to set a value. Ideally something like that
<Field setValue={some-value} type="hidden" .../>
Is there any way to achieve that? If not would anybody be able to point me to where I could add that functionality in the redux-form codebase if I fork it?
Thanks a lot!
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:18 (2 by maintainers)
Top Results From Across the Web
How to set the value of a input hidden field through JavaScript?
You need to run your script after the element exists. Move the <input type="hidden" name ...
Read more >How can I set value to hidden field (Form Api) and send them ...
After validation, I set a value to $form['#action'] and to the form fields I need : $form_state->setValue('action', $url_action);.
Read more >HTML DOM Input Hidden value Property - W3Schools
The value property sets or returns the value of the value attribute of the hidden input field. The value attribute defines the default...
Read more >jQuery set input hidden field value with demo - Codepedia.info
jQuery Set or Change Input Hidden Field Value: Here in this tutorial will learn how we can set the value to the input...
Read more >What is a Hidden Field in WordPress Forms? (Practical ...
The most important setting you want to pay attention to is Default Value. This field will load pre-populated with any text entered as...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The component you have wrapped with reduxForm receives a change function in the properties:
this.props.change('fieldname', new_value);
This is basically a hidden field. And also I think this would work in React v16 or never.