-
Notifications
You must be signed in to change notification settings - Fork 42
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
PrettyName on EmailTemplates #22
Comments
Oh! Heh... funny. I'll fix that asap. You'll want to use |
Thanks! If it isn't difficult, it could be interesting be able to access to the "Label" attribute too (eg |
It's not too difficult - it's all in the API. If you've based your work on the sample email template, you'll just need to do a bit of casting. The sample email template loops through the form value fields returned by Try something along these lines: @foreach (var field in Model.AllValueFields())
{
var fieldWithLabel = field as FormEditor.Fields.FieldWithLabel;
<tr>
<th>@field.Name</th>
<td>@(fieldWithLabel != null ? fieldWithLabel.Label : null)</td>
<td>@(fieldWithLabel != null ? fieldWithLabel.HelpText : null)</td>
<td>@field.SubmittedValueForEmail()</td>
</tr>
} Word of warning: I haven't tested if that code actually works, but I think it will - if nothing else it'll give you an idea of what you can do. |
The email template has been fixed in the latest release (0.12.0.2). |
Hi,
I think there's an error in email templates, on @field.PrettyName, the message shows the field type (eg, "Textbox") and not the pretty name (eg "Telephone").
I don't know if there is any other way to get the "Name" attribute or even the "Placeholder" attribute.
Thanks!
The text was updated successfully, but these errors were encountered: