@b4.inline.form(routes.Application.handleRequest) { implicit ifc =>
@b4.text( fooForm("foo"), '_hiddenLabel -> "Success", '_success -> true, 'placeholder -> "Success text..." )
@b4.text( fooForm("foo"), '_hiddenLabel -> "Warning", '_warning -> "Be carefull with this...", 'placeholder -> "Warning text..." )
@b4.text( fooForm("foo"), '_hiddenLabel -> "Error", '_error -> "An error occurred!", '_help -> "Another help text", 'placeholder -> "Error text..." )
}
// With feedback tooltips
@b4.inline.form(routes.Application.vertical, '_feedbackTooltip -> true) { implicit ifc =>
@b4.text( fooForm("foo"), '_hiddenLabel -> "Success", '_showIconValid -> true, 'placeholder -> "Success text..." )
@b4.text( fooForm("foo"), '_hiddenLabel -> "Warning", '_warning -> "Be carefull with this...", '_showIconWarning -> true, 'placeholder -> "Warning text..." )
@b4.text( fooForm("foo"), '_hiddenLabel -> "Error", '_error -> "An error occurred!", '_showIconOnError -> true, '_help -> "Another help text", 'placeholder -> "Error text..." )
}
@b4.inline.form(routes.Application.handleRequest) { implicit ifc =>
@b4.checkbox( fooForm("foo_check_custom_1"), '_text -> "Checkbox", 'checked -> true, '_custom -> true )
@b4.radio( fooForm("foo_radio_custom_1"), options = Seq("M"->"Male","F"->"Female"), '_label -> "Radio Group", '_custom -> true )
@b4.select( fooForm("foo_select_custom_1"), options = fruits, '_label -> "Select", '_custom -> true )
@b4.file( fooForm("foo_file_custom_1"), '_label -> "File", 'placeholder -> "Select a file...", '_custom -> true )
}
Or
@b4.inline.form(routes.Application.handleRequest, '_custom -> true) { implicit ifc =>
@b4.checkbox( fooForm("foo_check_custom_1"), '_text -> "Checkbox", 'checked -> true )
@b4.radio( fooForm("foo_radio_custom_1"), options = Seq("M"->"Male","F"->"Female"), '_label -> "Radio Group" )
@b4.select( fooForm("foo_select_custom_1"), options = fruits, '_label -> "Select" )
@b4.file( fooForm("foo_file_custom_1"), '_label -> "File", 'placeholder -> "Select a file..." )
}
@b4.inline.form(routes.Application.handleRequest) { implicit ifc =>
@b4.inputWrapped( "email", fooForm("foo"), '_hiddenLabel -> "Simple input group", 'placeholder -> "Custom input group for email..." ) { input =>
<div class="input-group">
<span class="input-group-prepend">
<span class="input-group-text">@@</span>
</div>
@input
</div>
}
@b4.inputWrapped( "text", fooForm("foo"), '_hiddenLabel -> "Fully customized", 'placeholder -> "A complicated one..." ) { input =>
<div class="input-group">
<span class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-star"></i></span>
</div>
@input
<div class="input-group-append">
<!-- Button and dropdown menu -->
</div>
</div>
}
@b4.inputWrapped( "text", fooForm("foo"), '_hiddenLabel -> "Number", 'value -> 0 ) { input =>
<div class="input-number input-group">
<span class="input-group-prepend">
<span class="input-group-text input-number-minus"><i class="fa fa-minus"></i></span>
</div>
@input
<span class="input-group-append">
<span class="input-group-text input-number-plus"><i class="fa fa-plus"></i></span>
</div>
</div>
}
}
@b4.inline.form(routes.Application.handleRequest) { implicit ifc =>
@b4.submit('class -> "btn btn-secondary"){ <i class="fa fa-ok"></i> Submit me! }
}