src/Support/Ajax.php
public function setupRepeatableList()
    {
        if (! Guard::verifyAjaxNonce('cuztom', 'security')) {
            return;
        }

        $data = [];
        $field = self::getField();

        if (Cuztom::isArray($field->value)) {
            foreach ($field->value as $value) {
                $data[] = $field->outputInput($value);
            }
        }

        echo (new Response(true, $data))->toJson();

        // wp
        die();
    }
public function setupRepeatableList()
    {
        if (! Guard::verifyAjaxNonce('cuztom', 'security')) {
            return;
        }

        $data = [];
        $field = self::getField();

        if (Cuztom::isArray($field->value)) {
            foreach ($field->value as $value) {
                $data[] = $field->outputInput($value);
            }
        }

        echo (new Response(true, $data))->toJson();

        // wp
        die();
    }
public function setupRepeatableList ( ) { if ( ! Guard :: verifyAjaxNonce ( 'cuztom' , 'security' ) ) { return ; } $ data = [ ] ; $ field = self :: getField ( ) ; if ( Cuztom :: isArray ( $ field -> value ) ) { foreach ( $ field -> value as $ value ) { $ data [ ] = $ field -> outputInput ( $ value ) ; } } echo ( new Response ( true , $ data ) ) -> toJson ( ) ; // wp die ( ) ; }
Setup repeatable list on init.

@return mixed
Setup repeatable list on init .