H
how to add 2 new selectbox with onchange function using custom module. there is any document to create custom module in una.
Hello @Hari !
Sure we have it. Here is the manual about your own module's creation https://github.com/unaio/una-vendor-test/wiki. And this one is for the work with the forms, displays, and fields: https://unacms.com/wiki/Dev-Forms
@LeonidS how to add 2 fields in edit profile by code. In your above document ,it shows only how to page creation, menu in new module . how i add 2 input fields in edit person form.
It has been described in the second document. You need to add the field to the Add from too. It will look like the following MySQL commands:
INSERT INTO `sys_objects_form` (`object`, `title`, `action`, `form_attrs`, `submit_name`, `table`, `key`, `uri`, `uri_title`, `params`, `deleteable`, `active`, `override_class_name`, `override_class_file`) VALUES
('sample_form_objects', 'Sample Form Object', 'samples/form_objects.php', '', 'do_submit', 'sample_input_types', 'id', '', '', 'a:1:{s:14:"checker_helper";s:25:"BxSampleFormCheckerHelper";}', 1, 1, 'BxSampleForm', 'samples/BxSampleForm.php');
INSERT INTO `sys_form_displays` (`display_name`, `module`, `object`, `title`) VALUES
('sample_form_objects_add', 'sample', 'sample_form_objects', 'Add'),
('sample_form_objects_edit', 'sample', 'sample_form_objects', 'Edit');
INSERT INTO `sys_form_inputs` (`object`, `module`, `name`, `value`, `values`, `checked`, `type`, `caption`, `info`, `required`, `collapsed`, `html`, `attrs`, `attrs_tr`, `attrs_wrapper`, `checker_func`, `checker_params`, `checker_error`, `db_pass`, `db_params`, `editable`, `deletable`) VALUES
('sample_form_objects', 'custom', 'text', '', '', 0, 'text', 'Text', '', 1, 0, 0, '', '', '', 'avail', '', 'Text is required', 'Xss', '', 1, 1),
('sample_form_objects', 'custom', 'do_submit', '_Submit', '', 0, 'submit', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 1);
INSERT INTO `sys_form_display_inputs` (`display_name`, `input_name`, `visible_for_levels`, `active`, `order`) VALUES
('sample_form_objects_add', 'text', 2147483647, 1, 20),
('sample_form_objects_add', 'do_submit', 2147483647, 1, 1001),
('sample_form_objects_edit', 'text', 2147483647, 0, 20),
('sample_form_objects_edit', 'do_submit', 2147483647, 1, 1000);
Hello @Hari !
Sure we have it. Here is the manual about your own module's creation https://github.com/unaio/una-vendor-test/wiki. And this one is for the work with the forms, displays, and fields: https://unacms.com/wiki/Dev-Forms
H
@LeonidS how to add 2 fields in edit profile by code. In your above document ,it shows only how to page creation, menu in new module . how i add 2 input fields in edit person form.
It has been described in the second document. You need to add the field to the Add from too. It will look like the following MySQL commands:
INSERT INTO `sys_objects_form` (`object`, `title`, `action`, `form_attrs`, `submit_name`, `table`, `key`, `uri`, `uri_title`, `params`, `deleteable`, `active`, `override_class_name`, `override_class_file`) VALUES
('sample_form_objects', 'Sample Form Object', 'samples/form_objects.php', '', 'do_submit', 'sample_input_types', 'id', '', '', 'a:1:{s:14:"checker_helper";s:25:"BxSampleFormCheckerHelper";}', 1, 1, 'BxSampleForm', 'samples/BxSampleForm.php');
INSERT INTO `sys_form_displays` (`display_name`, `module`, `object`, `title`) VALUES
('sample_form_objects_add', 'sample', 'sample_form_objects', 'Add'),
('sample_form_objects_edit', 'sample', 'sample_form_objects', 'Edit');
INSERT INTO `sys_form_inputs` (`object`, `module`, `name`, `value`, `values`, `checked`, `type`, `caption`, `info`, `required`, `collapsed`, `html`, `attrs`, `attrs_tr`, `attrs_wrapper`, `checker_func`, `checker_params`, `checker_error`, `db_pass`, `db_params`, `editable`, `deletable`) VALUES
('sample_form_objects', 'custom', 'text', '', '', 0, 'text', 'Text', '', 1, 0, 0, '', '', '', 'avail', '', 'Text is required', 'Xss', '', 1, 1),
('sample_form_objects', 'custom', 'do_submit', '_Submit', '', 0, 'submit', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 1);
INSERT INTO `sys_form_display_inputs` (`display_name`, `input_name`, `visible_for_levels`, `active`, `order`) VALUES
('sample_form_objects_add', 'text', 2147483647, 1, 20),
('sample_form_objects_add', 'do_submit', 2147483647, 1, 1001),
('sample_form_objects_edit', 'text', 2147483647, 0, 20),
('sample_form_objects_edit', 'do_submit', 2147483647, 1, 1000);