简体   繁体   中英

Automatically submit a form with hidden fields and images when an image is selected in rails

My plan is creating a form with hidden fields and displayed images. I want to submit this form and send all "hidden" data with selected image automatically when the image is selected / clicked. The form should be without a submit button. The project is written in rails. How can I implement it?

This ought to be the ticket:

image_submit_tag("image.png")

Any hidden tags will automatically be sent with the rest of the form, you don't need to do anything special there.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM