# Function components in `formService`

Name | Description
--- | ---
makeUrl | this function generates url combining backend url and the related object properties for http requests

generate

- generate function is inclusive for form generation defines given scope's client_cmd, model, schema, form, token, object_id objects

group | group function to group form layout by form meta data for layout
prepareFormItems | prepareFormItems looks up fields of schema objects and changes their types to proper type for schemaform for listnode, node and model types it uses templates to generate modal prepareforms checks input types and convert if necessary
dateformatter | dateformatter handles all date fields and returns humanized and jquery datepicker format dates
doItemAction | mode could be in ['normal', 'modal', 'new'] . the default mode is 'normal' and it loads data on same tab without modal. 'modal' will use modal to manipulate data and do all actions in that modal. 'new' will be open new page with response data
get_form | Communicates with api with given scope object.
get_list | gets list of related wf/model
get_wf | get_wf is the main function for client_cmd based api calls based on response content it redirects to related path/controller with pathDecider function
isValidEmail | checks if given value is a valid email address.
isValidTCNo | checks if given value is a valid identity number for Turkey.
isValidDate | checks if given value can be parsed as Date object
pageData | pageData object is moving object from response to controller with this object controller will not need to call the api for response object to work on to
pathDecider | pathDecider is used to redirect related path by looking up the data in response
redirectTo | redirectTo function redirects to related controller and path with given data before redirect setPageData must be called and pageData need to be defined otherwise redirected path will call api for its data
get_diff |
get_diff_array | extracts items of second array from the first array
item_from_array | get item unicode name from titleMap
submit | submit function is general function for submiting forms. redirectTo param is used for redirect if return value will be evaluated in a new page.