Example #1
0
        public InputField(string key, string label, bool required, string placeHolder, AddOn? addOnDirection, string addOnText, string addOnClass) : base(key, "input", label, required)
        {
            TemplateOptions.Type = "text";
            TemplateOptions.Placeholder = placeHolder;

            var addOn = new TemplateOptionAddOn(addOnText, addOnClass);

            if (addOnDirection != null)
            {
                if (addOnDirection == AddOn.Left)
                    TemplateOptions.AddonLeft = addOn;
                else
                    TemplateOptions.AddonRight = addOn;
            }
        }
Example #2
0
        public InputField(string key, string label, bool required, string placeHolder, AddOn?addOnDirection, string addOnText, string addOnClass) : base(key, "input", label, required)
        {
            TemplateOptions.Type        = "text";
            TemplateOptions.Placeholder = placeHolder;

            var addOn = new TemplateOptionAddOn(addOnText, addOnClass);

            if (addOnDirection != null)
            {
                if (addOnDirection == AddOn.Left)
                {
                    TemplateOptions.AddonLeft = addOn;
                }
                else
                {
                    TemplateOptions.AddonRight = addOn;
                }
            }
        }