- fixed member directory attribute using with callback functions in selectboxes;

This commit is contained in:
nikitasinelnikov
2020-01-21 18:27:59 +02:00
parent 6a93771511
commit 2b150d3860
+2 -2
View File
@@ -103,7 +103,7 @@ if ( ! class_exists( 'um\core\Form' ) ) {
$form_fields = UM()->fields()->get_fields();
$arr_options['fields'] = $form_fields;
if ( $arr_options['post']['members_directory'] == 'yes' ) {
if ( isset( $arr_options['post']['members_directory'] ) && $arr_options['post']['members_directory'] == 'yes' ) {
$ajax_source_func = $_POST['child_callback'];
if ( function_exists( $ajax_source_func ) ) {
$arr_options['items'] = call_user_func( $ajax_source_func, $arr_options['field']['parent_dropdown_relationship'] );
@@ -156,7 +156,7 @@ if ( ! class_exists( 'um\core\Form' ) ) {
);
}
if( isset( $_POST['child_callback'] ) && ! empty( $_POST['child_callback'] ) && isset( $form_fields[ $_POST['child_name'] ] ) ){
if ( isset( $_POST['child_callback'] ) && ! empty( $_POST['child_callback'] ) && isset( $form_fields[ $_POST['child_name'] ] ) ){
$ajax_source_func = $_POST['child_callback'];