Display certain fields from HTML button click
-
I created an <HTML content> field. In this field I have placed 3 buttons using
<!DOCTYPE html> <html> <head> <style> * { box-sizing: border-box; } .column { float: left; width: 33%; padding: 40px; } /* Clearfix (clear floats) */ .row { margin: 0; text-align: center; display: flex; flex-wrap: wrap; } </style> </head> <body> <h2>Images Side by Side</h2> <p>How to create side-by-side images with the CSS float property:</p> <div class="row"> <div class="column"> <img src="image_1" style="width:100%"> <button type="button">6 Lamp T8</button> </div> <div class="column"> <img src="image_2" style="width:100%"> <button type="button">HID</button> </div> <div class="column"> <img src="image_3" style="width:100%"> <button type="button">6 Lamp T5</button> </div> </div> </body> </html>Each button has an associated picture with it that all must be displayed next to the button on page load (which I have done). I want different fields to be displayed depending on which button I press. For example, all fields will be hidden until I click
button 1. When I do this, I want 3 separate dropdown fields to appear (fieldname1,fieldname2,fieldname3) which pull data from a database, but if I clickbutton 2, dropdownsfieldname4,fieldname5, andfieldname6will be displayed to the user. I’ve figured out how to use the Dropdown DS field, I just thought I’d mention it in case it’s different from a regular dropdown.Is it possible to do this with this plugin and if it is, how do I accomplish this?
The topic ‘Display certain fields from HTML button click’ is closed to new replies.