File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
src/content/docs/reference/forms Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -89,4 +89,14 @@ function onSearch(){
8989
9090This example shows how to:
9191- Use a search input that submits on Enter key press
92- - If we hav'nt used the 'onSubmitClick', it will default to the last button with 'whenFormOK' attribute
92+ - If we hav'nt used the 'onSubmitClick', it will default to the last button with 'whenFormOK' attribute
93+
94+
95+ ### Reloading state without click on submit button
96+
97+ When you only want to update the form state - reload the form without the need to click on a submit button.
98+
99+ ``` astro
100+ <BInput type="checkbox" name="showContent" onchange="submitForm(this)" onSubmitClick="state"/>
101+ {form.showContent ? 'Content is shown' : 'Content is hidden'}
102+ ```
You can’t perform that action at this time.
0 commit comments