Bug #4527


<form> element is not rendered when using progressive bootstrap

Added by Alan Finley over 8 years ago. Updated over 8 years ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:


I have a simple template:

<message id="form-test">

I'm trying to use it like this:

Wt::WApplication* createApplication(const Wt::WEnvironment& env)
    WApplication *app = new WApplication(env);
    app->messageResourceBundle().use(app->appRoot() + "my_form");

    WTemplate *t = new WTemplate(WString::tr("form-test"), app->root());

    return app;

If I set progressive-bootstrap option to true, the <form> element is not rendered. I just get <div>Hello</div> in the page source code.

Actions #1

Updated by Koen Deforche over 8 years ago


That's a known issue, and unfortunately there's no way to solve this: Wt already inserts a form in the top-level to capture all input fields when the user submits (without JavaScript), and some browsers will not allow nested

elements, in agreement with the specification.

Why do you need the




Actions #2

Updated by Koen Deforche over 8 years ago

  • Status changed from New to Feedback
Actions #3

Updated by Alan Finley over 8 years ago

I have a Wt auth widget and I want the browser to show save password promt for it.

Here are a few links on that subject:

Also I've already asked a question about it here:

As I understand, I need to submit some dummy form to make the browser show the password save dialog. And that form must exist in the first page when the broswer loads it.

Is it possbile to have a

element in a Wt widget set mode? Will I be able to submit it on some Wt button click? If so, I'll try insert such widget set as an iframe into my main app.

Actions #4

Updated by Koen Deforche over 8 years ago


Getting a browser to show save password is a bit of a voodoo-magic field: it's not specified what tricks a browser to offer this, and it seems to be a heterogeneous and moving target.

I've researched the topic already a few times, and I couldn't conclude what tricks it. The strange thing is that now and then, the browser does offer to do this for a Wt Auth login or registration form, with different browsers, even without progressive bootstrap mode, but I couldn't reproduce it consistently.

I wouldn't trust stackoverflow advice for this. You can load a

element from a widget set, just as in a Wt application which uses the default bootstrap method. The only restriction on form elements is that they cannot be nested.



Actions #5

Updated by Koen Deforche over 8 years ago

  • Assignee set to Koen Deforche

Also available in: Atom PDF