Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- JLoader::import('components.com_fields.libraries.fieldsplugin',JPATH_ADMINISTRATOR);
- class PlgFieldsCustomrepeat extends FieldsPlugin {
- public function onCustomFieldsPrepareDom($field, DOMElement $parent, JForm $form) {
- $fieldNode = parent::onCustomFieldsPrepareDom($field, $parent, $form);
- if (!$fieldNode) {
- return $fieldNode;
- }
- $fieldNode->setAttribute('type', 'subform');
- $fieldNode->setAttribute('formsource', $field->fieldparams->get('formsource', 0));
- $fieldNode->setAttribute('layout', $field->fieldparams->get('layoutformat'));
- $fieldNode->setAttribute('multiple', true);
- $fieldNode->setAttribute('groupByFieldset', $field->fieldparams->get('fieldsetgroup', 0) ? 'true' : 'false');
- $fieldNode->setAttribute('min', $field->fieldparams->get('min', 0));
- $fieldNode->setAttribute('max', $field->fieldparams->get('max', 1000));
- $fieldNode->setAttribute('default', $field->fieldparams->get('defaultset', 0));
- return $fieldNode;
- }
- }
Add Comment
Please, Sign In to add comment