-
Notifications
You must be signed in to change notification settings - Fork 114
Closed
rstudio/shiny
#4209Labels
Description
This may be intentional as I seem to remember there being some issues with submit buttons in shiny for R.
My use case was just a simple form POST with action attached, and I expected this to work:
from shiny import App, ui
from htmltools import HTML
app_ui = ui.page_auto(
ui.h2("Login"),
HTML(
"""
<form action="/api/auth/web/login" method="POST">
<input type="email" id="username" name="username">
<input type="password" id="password" name="password">
<button type="submit" class="btn btn-primary">Login</button>
</form>
"""
),
)
def server(input, output, session):
pass
app = App(app_ui, server)Nothing happens when the button is clicked, and I can't find the cause. A pure HTML file seems to work fine:
<!DOCTYPE html>
<html>
<body>
<form action="/api/auth/web/login" method="POST">
<input type="email" id="username" name="username">
<input type="password" id="password" name="password">
<button type="submit" class="btn btn-primary">Login</button>
</form>
</body>
</html>