I have a website where the client wants to have contour so as to be able to add new forms on certain pages and each of those forms will have some 3 common textField when combined must have a total value of 100 %.
So i was thinking of creating a custom TextField where the admin will be able to add 3 of them in any form on creation but how do i get to display the total % which needs to be 100 % at all time. No decimal will be allowed however.
The form should be something like this,
TextField1 TextField2 TextField3 Total % 10 30 50 100
My question is what is the best way of doing this ? How do i get to display the total % ?
Weird if i move the field to the first position of my form dont see any other the remaining fields. But again its only in the preview mode that the form is viewable.
I could also add a new Custom field to this GuidForm Where i can add a Label which will only show up using the conditional logic with the total % but on submit it does the validation for the 100 % right ?
The only thing can you tell me what its tthe FieldSetting for labelling ?
[Umbraco.Forms.Core.Attributes.Setting("Total Allocation", description = "Total %", control = "Umbraco.Forms.Core.FieldSetting.Label")] public string ShowTotal { get; set; }
Custom TextField
Hi,
I have a website where the client wants to have contour so as to be able to add new forms on certain pages and each of those forms will have some 3 common textField when combined must have a total value of 100 %.
So i was thinking of creating a custom TextField where the admin will be able to add 3 of them in any form on creation but how do i get to display the total % which needs to be 100 % at all time. No decimal will be allowed however.
The form should be something like this,
TextField1 TextField2 TextField3 Total %
10 30 50 100
My question is what is the best way of doing this ? How do i get to display the total % ?
Any suggestion most welcome
//Fuji
Comment author was deleted
Probably with some client side js
HIi Tim,
I have created the Custom TextField but somehow the textField is only visible in preview Mode. What am i missing here ?
Weird if i move the field to the first position of my form dont see any other the remaining fields. But again its only in the preview mode that the form is viewable.
My mistak...finally got it working. I miss
Hi Tim,
I could also add a new Custom field to this GuidForm Where i can add a Label which will only show up using the conditional logic with the total % but on submit it does the validation for the 100 % right ?
The only thing can you tell me what its tthe FieldSetting for labelling ?
Comment author was deleted
Don't think there is one
Try checking Umbraco.forms.Core.FieldSettings for all the options you have
is working on a reply...