Esempio n. 1
0
 public TemplateForm GetForm(string clientId, string userId, int formId)
 {
     var form = new SearchForm("1", "Biff Form");
     form.Fields.Add(new SelectField("occupancy", "Occupancy", false, new List<SelectFieldOption> { new SelectFieldOption { Name = "Owner Occupied", Value = "Owner Occupied" }, new SelectFieldOption { Name = "Other", Value = "Other" }}));
     form.Fields.Add(new InputField("loanamount", "Loan Amount", false, "Loan Amount", AddOn.Left, "$", null));
     return form;
 }
Esempio n. 2
0
        public static TemplateForm Create(Form data)
        {
            var form = new SearchForm(data.Id.ToString(), data.Name);

            data.Items.ToList().ForEach(field =>
               {
                   var section = field as Section;
                   if (section != null)
                   {
                       section.Items.ToList().ForEach(item =>
                       {
                           var question = item as Question;
                           if (question != null)
                           {
                               if (question.IsActive)
                               {
                                   var tf = TemplateFieldFactory.Create(question);
                                   form.Fields.Add(tf);
                               }
                           }
                       });
                   }
               });
            return form;
        }