pug-bootstrap/PUG-Bootstrap

Setting name for inputs

thomas15v opened this issue · 3 comments

+modal("Modal title","addDaemon")
        form(action='/admin/add_daemon', method="post")
            input(type='hidden', name="id", id="editid")
            +input('text','name', 'A nice name for the daemon', "Name")
            +input('text','ip', 'The http address from the daemon.', "Address")
            +input('text','key', 'The Key for the daemon', "Key")
            +input('text','group', 'The group for the daemon', "Group")
            +submit-primary('Add')

I have this code. Only my posts don't send data because the name tag is missing. And I can't figure out a way to bruteforce that in their 😟.

Fixed in the latest commit , now you can add name as a parameter to the mixin just like you mentioned, so now the syntax will be
+input(type,id,placeholder,label, name)

The checkbox and radio mixins still don't allow specifying names.

@hagabaka
Fixed in the latest commit
8480a5c
Now you can use

+checkbox(text,name,id)
+checkbox-inline(text,name,id)
+radio(text,name,id)
+radio-inline(text,name,id)