Okay
  Public Ticket #2809658
Forminator Forms Not Displaying
Closed

Comments

  •  1
    Shane Terpstra started the conversation

    There seems to be a bug with displaying all of the Forminator Forms when selecting Forminator as the data source.  Here is the list that wpDataTables populates.

    9882955896.png

    Here are the Forminator Forms

    Page 1:

    3511746958.png


    Page 2

    6231913140.png

    Only ten of the forms (those on page one) are showing up.

  •  2,572
    Aleksandar replied

    Hello Shane.

    Sorry for the inconvenience,

    Yes, you are right, there is an issue and this should not be a limitation.

    For getting all form types we are using Forminator API and we found that methods that should return all forms, quizzes, or polls actually returning only 10.

    We are in cooperation with devs in the Formiantor team and they are aware of this and it should be fixed in one of the next updates of the Formiantor plugin.

    What you can do until that is:
    First to change some code in Formainator API class where issues are found:

    In file wp-content/plugins/forminator/library/class-api.php around line 39, you will find this:

    public static function get_forms( $form_ids = null, $page = 1, $per_page = 10, $status = '' ) {

    and what you need to do is to replace 10 with -1 like this:

    public static function get_forms( $form_ids = null, $page = 1, $per_page = -1, $status = '' ) {
    

    If you are using quizzes and polls as well you can update these methods as well
    wp-content/plugins/forminator/library/class-api.php around line 1117

    public static function get_polls( $poll_ids = null, $page = 1, $per_page = -1, $status = '' ) {
    

    and for polls, in file wp-content/plugins/forminator/library/class-api.php around line 1374:

    public static function get_quizzes( $quiz_ids = null, $page = 1, $per_page = -1, $status = '' ) {
    

    The second option is to update those methods in our integration plugin in file wp-content/plugins/wdt-forminator-integration/wdt-forminator-integration.php around line 160 you will find this:

    public static function getForminatorFormsArr($formType)
        {
            $formsArray = [];
            switch ($formType) {
                case 'forms':
                    $formsArray = Forminator_API::get_forms();
                    break;
                case 'polls':
                    $formsArray = Forminator_API::get_polls();
                    break;
                case 'quizzes':
                    $formsArray = Forminator_API::get_quizzes();
                    break;
            }
            return $formsArray;
        }

    and you should replace it with this: 

    public static function getForminatorFormsArr($formType)
        {
            $formsArray = [];
            switch ($formType) {
                case 'forms':
                    $formsArray = Forminator_API::get_forms(null,1,-1,'');
                    break;
                case 'polls':
                    $formsArray = Forminator_API::get_polls(null,1,-1,'');
                    break;
                case 'quizzes':
                    $formsArray = Forminator_API::get_quizzes(null,1,-1,'');
                    break;
            }
            return $formsArray;
        }

    I hope that helps.

    Kind Regards, 

    Aleksandar Vuković
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables