I have a weird issue occuring. I create a form in code. I upload it and notice in the designer that i have Registration and Details (i think within the Fieldsets). I delete the text and for some reason which im not sure it reappears again.
The initialisation of Registration and Details that i can find are
Better question is once the form is showing up in Contour with the text Reg and Details, how could i blank this text in code or ensure if the user changes the form it remains blank?
Sorry a little lost now..... If i go into Umbraco > Contour > Form and make the changes to the fieldset and form properties they revert back at a later stage - unsure why though?
A code first form will always override the manual changes made to the form..., so you need to make the changes to your code... or remove the code first code...
to have an empty one in code, use empty strings as the page and fieldset caption
[Form("my form", ShowValidationSummary = true, MessageOnSubmit = "Profile updated!")]
public class Profile: FormBase
{
[Field("", "",
Mandatory = true,
DefaultValue = "{member.name}")]
public string Name { get; set; }
FormPage and ForFieldsets
I have a weird issue occuring. I create a form in code. I upload it and notice in the designer that i have Registration and Details (i think within the Fieldsets). I delete the text and for some reason which im not sure it reappears again.
The initialisation of Registration and Details that i can find are
but a little unsure how to hide the text from appearing?
Comment author was deleted
Hey,
A code first form will always override the manual changes made to the form...
So how could i stop this from happening as the user makes a change and then the two text fields reappear?
Better question is once the form is showing up in Contour with the text Reg and Details, how could i blank this text in code or ensure if the user changes the form it remains blank?
Comment author was deleted
You can't at this point, but can make it a config option in the next maintenance release
Sorry but just to double check - I cant remove those text fields. Whatever i declare in code is what will appear on the form?
Comment author was deleted
Yup but you can just use an empty string as the page/fieldset caption then they will be empty
Where would i do that? As its an Enum?
Comment author was deleted
Nope not as an enum, just on the form and fieldset attribute
Sorry a little lost now..... If i go into Umbraco > Contour > Form and make the changes to the fieldset and form properties they revert back at a later stage - unsure why though?
Comment author was deleted
A code first form will always override the manual changes made to the form..., so you need to make the changes to your code... or remove the code first code...
to have an empty one in code, use empty strings as the page and fieldset caption
[Form("my form", ShowValidationSummary = true, MessageOnSubmit = "Profile updated!")] public class Profile: FormBase { [Field("", "", Mandatory = true, DefaultValue = "{member.name}")] public string Name { get; set; }
so this line [Field("", "",
is working on a reply...