hi jeameeldroid,
I am sure you will soon get a reply from epesi team but let me help you on this.
You can add your own jscript to show / hide the fields depending on the checkbox state but as I needed that on several forms I developed it in a more general approach.
I have just created a pull request to the epesi github dev branch which will be reviewed and hopefully merged by epesi team but you can already view and use it under:
https://github.com/georgehristov/EPESI-dev/commit/dc1f2284329afda77698068ab0383cfef10bad32
The way to use it is as follows (not sure how deep you are in programming or with epesi but I make it short and you ask if something not clear):
You have to activate a QFfield callback for the checkbox field and use a method similar to below:
public static function QFfield_books(&$form, $field, $label, $mode, $default, $desc, $rb_obj, $display_callbacks) {
Utils_RecordBrowserCommon::QFfield_checkbox($form, $field, $label, $mode, $default, $desc, $rb_obj);
$autohide_mapping = array(
array('values'=>true,
'mode'=>'show',
'fields'=>array('books_type')
),
);
$form->autohide_fields($field, $default, $autohide_mapping);
}
You have to keep in mind that the 'books_type' should not be generally set as 'required' field as the browser simply hides the fields as per the setting and they are not visible to the user but they are still submitted. If you want it to be required in case the books is 'checked' then you have to add a custom form rule.
Your changes to epesi will not be overwritten during update unless you have modified the code in one of the core epesi files. The custom fields (even in core recordsets) as well as your custom modules are intact after the update.
EDIT:
All above said and considering the field names you mentioned I believe an addon structure would be more suitable in your case. In this case you need two recordsets - a main one (lets say "author") to contain the records and another one to contain the books related to each author. The "books" should then be setup for an addon to the "author" recordset.
See http://www.epesi.org/HelloWorld-part_6_addons or inspect the code in epesi, it is a widely used feature.
brgds,
Georgi