public static FormElement CreatePointAddressElement( string name, string label, Guid?id = null, bool conditionallyShow = false, bool requiresAllConditionallyShowPredicates = false, List <ConditionallyShowPredicate> conditionallyShowPredicates = null, bool required = false, bool readOnly = false, string defaultValue = null, string placeholderValue = null, string hint = null, List <string> stateTerritoryFilter = null, List <string> addressTypeFilter = null ) { FormElement pointAddressElement = new FormElement(); pointAddressElement.type = "pointAddress"; pointAddressElement.id = initialiseId(id); pointAddressElement.conditionallyShow = conditionallyShow; pointAddressElement.requiresAllConditionallyShowPredicates = requiresAllConditionallyShowPredicates; pointAddressElement.conditionallyShowPredicates = conditionallyShowPredicates; pointAddressElement.name = name; pointAddressElement.label = label; pointAddressElement.required = required; pointAddressElement.readOnly = readOnly; pointAddressElement.defaultValue = defaultValue; pointAddressElement.placeholderValue = placeholderValue; pointAddressElement.hint = hint; pointAddressElement.stateTerritoryFilter = stateTerritoryFilter; pointAddressElement.addressTypeFilter = addressTypeFilter; return(pointAddressElement); }
public static FormElement CreateTextElement( string name, string label, Guid?id = null, bool conditionallyShow = false, bool requiresAllConditionallyShowPredicates = false, List <ConditionallyShowPredicate> conditionallyShowPredicates = null, bool required = false, bool readOnly = false, string defaultValue = null, string placeholderValue = null, string hint = null, int?minLength = null, int?maxLength = null ) { FormElement textElement = new FormElement(); textElement.type = "text"; textElement.id = initialiseId(id); textElement.conditionallyShow = conditionallyShow; textElement.requiresAllConditionallyShowPredicates = requiresAllConditionallyShowPredicates; textElement.conditionallyShowPredicates = conditionallyShowPredicates; textElement.name = name; textElement.label = label; textElement.required = required; textElement.readOnly = readOnly; textElement.defaultValue = defaultValue; textElement.placeholderValue = placeholderValue; textElement.minLength = minLength; textElement.maxLength = maxLength; textElement.hint = hint; return(textElement); }
public static FormElement CreateComplianceElement( string name, string label, List <FormElementOption> options, Guid?id = null, bool conditionallyShow = false, bool requiresAllConditionallyShowPredicates = false, List <ConditionallyShowPredicate> conditionallyShowPredicates = null, bool required = false, bool readOnly = false, string defaultValue = null, string hint = null, bool isDataLookup = false, long?dataLookupId = null, bool isElementLookup = false, long?elementLookupId = null ) { FormElement complianceElement = new FormElement(); complianceElement.type = "compliance"; complianceElement.id = initialiseId(id); complianceElement.conditionallyShow = conditionallyShow; complianceElement.requiresAllConditionallyShowPredicates = requiresAllConditionallyShowPredicates; complianceElement.conditionallyShowPredicates = conditionallyShowPredicates; complianceElement.name = name; complianceElement.label = label; complianceElement.options = options; complianceElement.required = required; complianceElement.readOnly = readOnly; complianceElement.defaultValue = defaultValue; complianceElement.hint = hint; complianceElement.isDataLookup = isDataLookup; if (dataLookupId.HasValue) { complianceElement.dataLookupId = dataLookupId.Value; } complianceElement.isElementLookup = isElementLookup; if (elementLookupId.HasValue) { complianceElement.elementLookupId = elementLookupId.Value; } return(complianceElement); }
public static FormElement CreateBooleanElement( string name, string label, Guid?id = null, bool conditionallyShow = false, bool requiresAllConditionallyShowPredicates = false, List <ConditionallyShowPredicate> conditionallyShowPredicates = null, bool required = false, bool readOnly = false, bool defaultValue = false, string hint = null, bool isDataLookup = false, long?dataLookupId = null, bool isElementLookup = false, long?elementLookupId = null ) { FormElement booleanElement = new FormElement(); booleanElement.type = "boolean"; booleanElement.id = initialiseId(id); booleanElement.conditionallyShow = conditionallyShow; booleanElement.requiresAllConditionallyShowPredicates = requiresAllConditionallyShowPredicates; booleanElement.conditionallyShowPredicates = conditionallyShowPredicates; booleanElement.name = name; booleanElement.label = label; booleanElement.required = required; booleanElement.readOnly = readOnly; booleanElement.defaultValue = defaultValue; booleanElement.hint = hint; booleanElement.isDataLookup = isDataLookup; if (dataLookupId.HasValue) { booleanElement.dataLookupId = dataLookupId.Value; } booleanElement.isElementLookup = isElementLookup; if (elementLookupId.HasValue) { booleanElement.elementLookupId = elementLookupId.Value; } return(booleanElement); }
public static FormElement CreateCivicaStreetNameElement( string name, string label, Guid?id = null, bool conditionallyShow = false, bool requiresAllConditionallyShowPredicates = false, List <ConditionallyShowPredicate> conditionallyShowPredicates = null, bool required = false, bool readOnly = false, string placeholderValue = null, string hint = null, bool isDataLookup = false, long?dataLookupId = null, bool isElementLookup = false, long?elementLookupId = null ) { FormElement civicaStreetNameElement = new FormElement(); civicaStreetNameElement.type = "civicaStreetName"; civicaStreetNameElement.id = initialiseId(id); civicaStreetNameElement.conditionallyShow = conditionallyShow; civicaStreetNameElement.requiresAllConditionallyShowPredicates = requiresAllConditionallyShowPredicates; civicaStreetNameElement.conditionallyShowPredicates = conditionallyShowPredicates; civicaStreetNameElement.name = name; civicaStreetNameElement.label = label; civicaStreetNameElement.required = required; civicaStreetNameElement.readOnly = readOnly; civicaStreetNameElement.placeholderValue = placeholderValue; civicaStreetNameElement.hint = hint; if (dataLookupId.HasValue) { civicaStreetNameElement.dataLookupId = dataLookupId.Value; } civicaStreetNameElement.isElementLookup = isElementLookup; if (elementLookupId.HasValue) { civicaStreetNameElement.elementLookupId = elementLookupId.Value; } return(civicaStreetNameElement); }
public static FormElement CreateSummaryElement( string name, string label, List <Guid> elementIds, Guid?id = null, bool conditionallyShow = false, bool requiresAllConditionallyShowPredicates = false, List <ConditionallyShowPredicate> conditionallyShowPredicates = null ) { FormElement summaryElement = new FormElement(); summaryElement.type = "summary"; summaryElement.id = initialiseId(id); summaryElement.conditionallyShow = conditionallyShow; summaryElement.requiresAllConditionallyShowPredicates = requiresAllConditionallyShowPredicates; summaryElement.conditionallyShowPredicates = conditionallyShowPredicates; summaryElement.name = name; summaryElement.label = label; summaryElement.elementIds = elementIds; return(summaryElement); }
public static FormElement CreateSectionElement( string label, Guid?id = null, bool conditionallyShow = false, bool requiresAllConditionallyShowPredicates = false, List <ConditionallyShowPredicate> conditionallyShowPredicates = null, string hint = null, Boolean isCollapsed = false, List <FormElement> elements = null ) { FormElement sectionElement = new FormElement(); sectionElement.type = "section"; sectionElement.id = initialiseId(id); sectionElement.conditionallyShow = conditionallyShow; sectionElement.requiresAllConditionallyShowPredicates = requiresAllConditionallyShowPredicates; sectionElement.conditionallyShowPredicates = conditionallyShowPredicates; sectionElement.label = label; sectionElement.hint = hint; sectionElement.isCollapsed = isCollapsed; sectionElement.elements = elements; return(sectionElement); }
public static FormElement CreateCivicaNameRecordElement( string name, string label, Guid?id = null, bool conditionallyShow = false, bool requiresAllConditionallyShowPredicates = false, List <ConditionallyShowPredicate> conditionallyShowPredicates = null, bool required = false, bool readOnly = false, dynamic defaultValue = null, string hint = null, Boolean useGeoscapeAddressing = false, string titleLabel = null, string familyNameLabel = null, string givenName1Label = null, Boolean givenName1IsRequired = false, Boolean givenName1IsHidden = false, string emailAddressLabel = null, Boolean emailAddressIsRequired = false, Boolean emailAddressIsHidden = false, string homePhoneLabel = null, Boolean homePhoneIsRequired = false, Boolean homePhoneIsHidden = false, string businessPhoneLabel = null, Boolean businessPhoneIsRequired = false, Boolean businessPhoneIsHidden = false, string mobilePhoneLabel = null, Boolean mobilePhoneIsRequired = false, Boolean mobilePhoneIsHidden = false, string faxPhoneLabel = null, Boolean faxPhoneIsRequired = false, Boolean faxPhoneIsHidden = false, string streetAddressesLabel = null, string address1Label = null, string address2Label = null, string postcodeLabel = null ) { FormElement civicaNameRecordElement = new FormElement(); civicaNameRecordElement.type = "civicaNameRecord"; civicaNameRecordElement.id = initialiseId(id); civicaNameRecordElement.conditionallyShow = conditionallyShow; civicaNameRecordElement.requiresAllConditionallyShowPredicates = requiresAllConditionallyShowPredicates; civicaNameRecordElement.conditionallyShowPredicates = conditionallyShowPredicates; civicaNameRecordElement.name = name; civicaNameRecordElement.label = label; civicaNameRecordElement.required = required; civicaNameRecordElement.readOnly = readOnly; civicaNameRecordElement.defaultValue = defaultValue; civicaNameRecordElement.hint = hint; civicaNameRecordElement.useGeoscapeAddressing = useGeoscapeAddressing; civicaNameRecordElement.titleLabel = titleLabel; civicaNameRecordElement.familyNameLabel = familyNameLabel; civicaNameRecordElement.givenName1Label = givenName1Label; civicaNameRecordElement.givenName1IsRequired = givenName1IsRequired; civicaNameRecordElement.givenName1IsHidden = givenName1IsHidden; civicaNameRecordElement.emailAddressLabel = emailAddressLabel; civicaNameRecordElement.emailAddressIsRequired = emailAddressIsRequired; civicaNameRecordElement.emailAddressIsHidden = emailAddressIsHidden; civicaNameRecordElement.homePhoneLabel = homePhoneLabel; civicaNameRecordElement.homePhoneIsRequired = homePhoneIsRequired; civicaNameRecordElement.homePhoneIsHidden = homePhoneIsHidden; civicaNameRecordElement.businessPhoneLabel = businessPhoneLabel; civicaNameRecordElement.businessPhoneIsRequired = businessPhoneIsRequired; civicaNameRecordElement.businessPhoneIsHidden = businessPhoneIsHidden; civicaNameRecordElement.mobilePhoneLabel = mobilePhoneLabel; civicaNameRecordElement.mobilePhoneIsRequired = mobilePhoneIsRequired; civicaNameRecordElement.mobilePhoneIsHidden = mobilePhoneIsHidden; civicaNameRecordElement.faxPhoneLabel = faxPhoneLabel; civicaNameRecordElement.faxPhoneIsRequired = faxPhoneIsRequired; civicaNameRecordElement.faxPhoneIsHidden = faxPhoneIsHidden; civicaNameRecordElement.streetAddressesLabel = streetAddressesLabel; civicaNameRecordElement.address1Label = address1Label; civicaNameRecordElement.address2Label = address2Label; civicaNameRecordElement.postcodeLabel = postcodeLabel; return(civicaNameRecordElement); }