• Resolved pb52

    (@paulbarrett1952)


    i’m trying to create a table from a forminator form, but only about 10 of our forms are listed. Is there a limit?

    • This topic was modified 3 years, 6 months ago by pb52.
Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author wpDataTables

    (@wpdatatables)

    Hi futureit,

    Thank you for your interest in wpDataTables integration for Forminator Forms.

    Sorry for inconvenience,

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

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

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

    What you can do until that is:
    First to change some code in Formainator API class where issues is 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 = '' ) {

    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 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;
        }

    Best regards.

    Thread Starter pb52

    (@paulbarrett1952)

    Thanks for getting back to me.

    To be clear, do I need to do ALL of the above or is it a choice between the two options?

    Plugin Author wpDataTables

    (@wpdatatables)

    Hi futureit,

    No just one.
    In Forminator plugin or in our integration add-on, which is easier for you, not the both.

    Best regards.

    Thread Starter pb52

    (@paulbarrett1952)

    Thanks. I went for the second option, and it worked.

    Now I just have to work out how to use it!

    Plugin Author wpDataTables

    (@wpdatatables)

    Hi there,

    I am glad that now is working fine.

    On plugins “Details” tab is explain i details how to use this integration. About wpDataTables you can check out our documentation(It contain all features: Lite and Premium)

    Note about this fix: If we release next update before Formiantor forms plugin, then we will include this fix in our add-on, so you do not have to worry about that.

    Best regards.

    Thread Starter pb52

    (@paulbarrett1952)

    Hi

    Yeah, I figured updating your plugin was the best way because you’re going to be more focused on this issue than Forminator. I could see myself having to repeat the changes if I’d gone the Forminator route.

    Thread Starter pb52

    (@paulbarrett1952)

    Why do you keep calling me futureit BTW? I mean, I’ll answer to most things, but futureit? ??

    Plugin Author wpDataTables

    (@wpdatatables)

    Hi Paul,

    All right that is fine. Forminator team have to fix this because it is related with public accessible API docs where is explained that those methods have to return all data not just limited(10), so we believe that this will be fixed very soon by their side.

    We are so sorry about ‘futureit’, it is our mistake and will not be happen again.

    Best regards.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Not all forms are available for selecion’ is closed to new replies.