Project

General

Profile

Bug #4527

<form> element is not rendered when using progressive bootstrap

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

Status:
Feedback
Priority:
Normal
Assignee:
Target version:
Start date:
10/28/2015
Due date:
% Done:

0%

Estimated time:

Description

I have a simple template:

<message id="form-test">
    <form>
        <div>Hello</div>
    </form>
</message>

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.

#1

Updated by Koen Deforche over 6 years ago

Hey,

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

actually?

Regards,

koen

#2

Updated by Koen Deforche over 6 years ago

  • Status changed from New to Feedback
#3

Updated by Alan Finley over 6 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:

http://stackoverflow.com/questions/2382329/how-can-i-get-browser-to-prompt-to-save-password

https://gist.github.com/kostiklv/968927

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

http://redmine.emweb.be/issues/4172#change-12270

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.

#4

Updated by Koen Deforche over 6 years ago

Hey,

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.

Regards,

koen

#5

Updated by Koen Deforche over 6 years ago

  • Assignee set to Koen Deforche

Also available in: Atom PDF