-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LabelOnRightAttribute usage #37
Comments
Thanks for trying out. It seems to be rendering the raw template instead of
rendering it properly. There may be a missing @ somewhere.
Could you fork the project and add your code to the examples and I will
take a look ASAP?
…On Sat, 4 Feb 2017 at 05:09, Budsy ***@***.***> wrote:
I tried adding new FormFactory.Attributes.LabelOnRightAttribute() to the
GetCustomAttributes field list (in declarative programmable model example)
for a checkbox. It rendered the following:
"if (Model.GetCustomAttributes().OfType ().Any()) { } else //if not
required, then it is possible to post a false value, which means we need a
hidden field as unchecked checkboxes aren't posted. sigh. { } Checkbox
label here"
This wasn't quite what I expected. Is there a correct way to get the label
for a checkbox to render to the right of the box? A checkbox works great
with the default label on the left.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#37>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAQ0-mK2WRvdwSVUR7tlec7eLDv_E4XMks5rZAgegaJpZM4L3C0m>
.
|
I put my code into the Mvc Examples Index demo page on a fork. Currently I'm going to try to compile your source and track this down. ...have to upgrade my VS first. ;-) |
I found the bug and made a fix in FormFactory/Views/Shared/FormFactory/Property.System.Boolean.cshtml . It was, as you surmised, missing the @ on the if keyword, needed after the html <label> tag line in the View markup file. I compiled the Dll with this change and am using it in my project now. Works like a charm. |
thanks for the PR! |
I tried adding new FormFactory.Attributes.LabelOnRightAttribute() to the GetCustomAttributes field list (in declarative programmable model example) for a checkbox. It rendered the following:
"if (Model.GetCustomAttributes().OfType ().Any()) { } else //if not required, then it is possible to post a false value, which means we need a hidden field as unchecked checkboxes aren't posted. sigh. { } Checkbox label here"
This wasn't quite what I expected. Is there a correct way to get the label for a checkbox to render to the right of the box? A checkbox works great with the default label on the left.
The text was updated successfully, but these errors were encountered: