open Jetengine plugin in \wp-content\plugins\jet-engine\includes\modules\forms\builder.php Add custom filter in function public function render_form( $force_update = false ) { //this is custom hook that need to add in jetengine $this->rows = apply_filters( 'customjetengineform', $this->form_id, $this->rows );
in \wp-content\themes\themesfolder\function.php add_filter('customjetengineform','function_customjetengineform', 10, 2) ; function function_customjetengineform($form_id, $data){ $loop = $data ; $nama[0]['value'] = 'abu'; $nama[0]['label'] = 'abu'; $nama[1]['value'] = 'luqman'; $nama[1]['label'] = 'luqman'; foreach($loop as $key => $val){ if($key == 4) $data[$key][0]['settings']['repeater_fields']['2']['settings']['field_options'] = $nama ; } //print_r("<pre>");print_r($data); return $data; }
For Admin Form
open Jetengine plugin in \wp-content\plugins\jet-engine\includes\components\meta-boxes\post.php Add custom filter in function public function prepare_meta_fields( $meta_box = array() ) { //this is custom hook that need to add in jetengine $meta_box = apply_filters( 'customjetengineformadmin', $this->get_box_id(), $meta_box );
in \wp-content\themes\themesfolder\function.php add_filter('customjetengineformadmin','function_customjetengineformadmin', 10, 2) ; function function_customjetengineformadmin($form_id, $data){ //print_r("<pre>");print_r($data);exit(); $loop = $data ; $nama[0]['key'] = 'abu'; $nama[0]['value'] = 'abu'; $nama[1]['key'] = 'luqman'; $nama[1]['value'] = 'luqman'; foreach($loop as $key => $val){ if($key == 4) $data[$key]['repeater-fields'][2]['options'] = $nama ; } //print_r("<pre>");print_r($data); return $data; }