Custom fields

- added listing of custom fields in form editor
- ability to delete a custom field
- mades changes to the form editor in order to accomodate for the new custom fields system
- fix form editor bugs
- cleanup
This commit is contained in:
Jonathan Labreuille
2015-11-05 18:35:12 +01:00
parent 5473f94e24
commit b12f7f29de
16 changed files with 394 additions and 202 deletions

View File

@ -9,12 +9,12 @@ abstract class Base {
protected static function getInputValidationRules($block) {
$rules = array();
if($block['field'] === 'email') {
if($block['name'] === 'email') {
$rules[] = 'required';
$rules[] = 'custom[email]';
}
if($block['field'] === 'list') {
if($block['name'] === 'list') {
$rules[] = 'required';
}
@ -83,7 +83,7 @@ abstract class Base {
// return field name depending on block data
protected static function getFieldName($block = array()) {
return $block['field'];
return $block['id'];
}
protected static function getFieldLabel($block = array()) {