-
Notifications
You must be signed in to change notification settings - Fork 1
ln o gravityforms
Chris Weight edited this page Apr 28, 2016
·
14 revisions
- Finish implementing paged form rendering and logic
- Create paging indicators for the above
- Change confirmation and validation rendering to use ng-show/hide or ng-if on the main form body and the relevant blocks to enable use of ng-animate for posh transitions
- Migrate to ng-model for form data gathering
- Implement some kind of 'element-parser override' system, where a developer can provide methods to render specific input types at the component config level and per-form to enable use of custom directives etc in forms.
- This may look like the following:
Markup:
<form ln-o-gravity-form="{{vm.formId}}" ln-method-map={{vm.gfParserMethodOverrides}}" ln-load-from-api="true"></form>
Controller:
vm.gfParserMethodOverrides = {
select: cbSelectParse,
email: cbEmailParse,
...
}
function cbSelectParse(data) {
var _html = '';
// Take care of parsing the field data add your custom markup to the `_html` variable and return it
return _html;
}
...
-
cbSelectParsein this case, could be a controller method that a developer defines to parse the HTML for any 'select' elements on a particular form, so that custom HTML can be created per-input-type as required.