Closed taufik-nurrohman closed 3 years ago
This allows us to capture the currently selected tab natively simply by submitting the form. The tab namespace should be free from the reserved file CRUD input prefix (e.g. file and page):
tab
file
page
<form method="post"> <div class="tabs"> <div class="tab"> <label> <input name="tab[0]" type="radio" value="file"> <span>File</span> </label> <p>Content for file tab goes here…</p> </div> <!-- … --> </div> </form>
This way, JavaScript becomes optional and can be used simply to convert the radio elements into a tab bar. To make nesting tabs should be easy.
Appending hidden input via JavaScript with value that changes on every tab click event should be enough. No need to do a refactor in the markup.
This allows us to capture the currently selected tab natively simply by submitting the form. The
tab
namespace should be free from the reserved file CRUD input prefix (e.g.file
andpage
):This way, JavaScript becomes optional and can be used simply to convert the radio elements into a tab bar. To make nesting tabs should be easy.