Form plugin blank page

Hello.

It's my first post here and I'm newbie with Elgg. Well, I installed the Form plugin in a localhost to test it, but I'm having problems when I try to create the form, in fact it is created but when I try to add a field or change the configuration the result is a blank page. The Elgg version installed is 1.7 and Form plugin 0.8.5

Thanks

  • sorry that should be

    mod/form/views/default/form/nav.php

  • I replaced

    $_SESSION['last_search_qs'] = null;
    $_SESSION['last_view_qs'] = $_SERVER["QUERY_STRING"];


    $nav = elgg_view('form/nav',array('form_id'=>$form_id,'form_view'=>$form_view,'enable_recommendations'=>$form->allow_recommendations));

    by

    $_SESSION['last_search_qs'] = null;
    $_SESSION['last_view_qs'] = $_SERVER["QUERY_STRING"];
    print "Form id is $form_id";
    $nav = elgg_view('form/nav',array('form_id'=>$form_id,'form_view'=>$form_view,'enable_recommendations'=>$form->allow_recommendations));

    The message "Form id is 4" was showed. I added in the file mod/form/views/default/form/nav.php the code

    print "I am here" after <?php

    This last message is not showed.

  • What happens if you just comment out the

    $nav = elgg_view('form/nav', ...)

    line?

  • I commented the line

    $nav = elgg_view('form/nav',array('form_id'=>$form_id,'form_view'=>$form_view,'enable_recommendations'=>$form->allow_recommendations));

    and it works

  • ok, we are getting closer (but I think we still need the navigation).

    Now can you put that line back, but comment out the switch statement in the nav view?

    This bit:

    switch($vars['form_view']) {
        case 'all':        $allselect = 'class="selected"';
                        break;
        case 'friends':        $friendsselect = 'class="selected"';
                        break;
        case 'recommendations':        $recommendedselect = 'class="selected"';
                        break;
        case 'mine':        $mineselect = 'class="selected"';
                        break;
    }

  • Ah wait!

    There is a

    <? } ?>

    on line 22 of that file.

    Keep in the switch and replace that with

    <?php } ?>

    I think that we nailed it.

    My PHP sees nothing wrong with that, but yours does I bet.

  • Blank page again.

    The failure can be in

    $url_start = $vars['url'].'mod/form/my_forms.php?id='.$vars['form_id'].'&amp;mode='.$vars['mode'];

  • Ah wait!

    There is a

    <? } ?>

    on line 22 of that file.

    Keep in the switch and replace that with

    <?php } ?>

    I think that we nailed it.

    My PHP sees nothing wrong with that, but yours does I bet.

    One moment...

  • Now it works!! Great!!

    I am grateful to you for your help.

  • I have checked my code and that was the only place "<? " occurs without the php. It was just a typo that my xampp install ignored.

    Thanks! I think all this was worth the effort.

    I'll put the fix in my next release.

Form and related plugins

Form and related plugins

User-generated content, flexible user and group profiles, registration forms, custom file forms