Form not showing results: configuration error?

Form not showing results: configuration error?

Thursday 18 March 2010 4:48:41 am - 10 replies

Modified on Thursday 18 March 2010 4:52:13 am by V. van Velzen

Author Message

Yannick Komotir

Thursday 18 March 2010 7:41:03 am

All class collectors attributes must be present in your submit form.

<|- Software Engineer @ eZ Publish developpers -|>
@ http://twitter.com/yannixk

V. van Velzen

Monday 22 March 2010 12:30:53 am

Hi Yannick,

Thanks for replying. All class collector attributes are present in my form. The form submits (when all mandatory fields are entered), it just does not show a result page. And when mandatory fields are left empty, EZ returns to the form but does not show an error message...

V. van Velzen

Tuesday 23 March 2010 1:57:01 am

Anyone? Any help would be appreciated...

V. van Velzen

Thursday 25 March 2010 1:11:07 am

Hi all,

Even if you don't know the answer yourself, maybe you could point me to someone who does? It's kinda crucial I get this form working correctly...

TIA,

Vivienne

Nicolas Pastorino

Friday 26 March 2010 7:11:10 am

Hi Vivienne,

Could you tell us what template is used to display this : http://www.mywebsite.com/index.php/content/collectedinfo/3309
An override may be getting in the way there.

Let us know,
Cheers,

--
Nicolas Pastorino
Director Community - eZ
Member of the Community Project Board

eZ Publish Community on twitter: http://twitter.com/ezcommunity

t : http://twitter.com/jeanvoye
G+ : http://plus.tl/jeanvoye

V. van Velzen

Monday 29 March 2010 1:59:48 am

Hi Nicholas,

Thanks for replying. I'm using a custom template for this page, code below:

<h1>{$node.name|wash()}</h1>

        {include name=Validation uri='design:content/collectedinfo_validation.tpl'
                 class='message-warning'
                 validation=$validation collection_attributes=$collection_attributes}

        <div class="attribute-short">
                {attribute_view_gui attribute=$node.data_map.form_intro}
        </div>
        <form method="post" name="myform" class="kasteelseminar" action={"content/action"|ezurl} onsubmit="return checkFields()">
            <p> </p>
            <table width="500" cellspacing="0" cellpadding="0" border="0">
                <tr>
                    <td colspan="2"><strong>Organisation</strong></td>
                </tr>
                <tr>
                    <td>{$node.data_map.naam_organisation.contentclass_attribute.name} *)</td>
                    <td>{attribute_view_gui attribute=$node.data_map.naam_organisation}</td>
                </tr>
                <tr>
                    <td>{$node.data_map.postaddress.contentclass_attribute.name} *)</td>
                    <td>{attribute_view_gui attribute=$node.data_map.postaddress}</td>
                </tr>
                <tr>
                    <td>{$node.data_map.postalcode_city.contentclass_attribute.name} *)</td>
                    <td>{attribute_view_gui attribute=$node.data_map.postalcode_city}</td>
                </tr>
                <tr><td colspan="2"> </td></tr>
                <tr>
                    <td colspan="2"><strong>Attendee 1</strong></td>
                </tr>
                    <td> </td>
                <td>{attribute_view_gui attribute=$node.data_map.attendee_1}</td>
            </tr>
            <tr>
                <td> </td>
                <td>{attribute_view_gui attribute=$node.data_map.gender_1}</td>
            </tr>
            <tr>
                <td>{$node.data_map.name_attendee_1.contentclass_attribute.name} *)</td>
                <td>{attribute_view_gui attribute=$node.data_map.name_attendee_1}</td>
            </tr>
            <tr>
                <td>{$node.data_map.function_attendee_1.contentclass_attribute.name} *)</td>
                <td>{attribute_view_gui attribute=$node.data_map.function_attendee_1}</td>
            </tr>
            <tr>
                <td>{$node.data_map.email_1.contentclass_attribute.name} *)</td>
                <td>{attribute_view_gui attribute=$node.data_map.email_1}</td>
            </tr>
            <tr>
                <td>{$node.data_map.phone_1.contentclass_attribute.name} *)</td>
                <td>{attribute_view_gui attribute=$node.data_map.phone_1}</td>
            </tr>
            <tr><td colspan="2"><p> </p></td></tr>
            <tr>
                <td colspan="2">
                    <strong>Attendee 2</strong></td>
            </tr>
            <tr>
                <td> </td>
                <td>{attribute_view_gui attribute=$node.data_map.attendee_2}</td>
            </tr>
            <tr>
                <td> </td>
                <td>{attribute_view_gui attribute=$node.data_map.gender_2}</td>
            </tr>
            <tr>
                <td>{$node.data_map.name_attendee_2.contentclass_attribute.name}</td>
                <td>{attribute_view_gui attribute=$node.data_map.name_attendee_2}</td>
            </tr>
            <tr>
                <td>{$node.data_map.function_attendee_2.contentclass_attribute.name}</td>
                <td>{attribute_view_gui attribute=$node.data_map.function_attendee_2}</td>
            </tr>
            <tr>
                <td>{$node.data_map.email_2.contentclass_attribute.name}</td>
                <td>{attribute_view_gui attribute=$node.data_map.email_2}</td>
            </tr>
            <tr>
                <td>{$node.data_map.phone_2.contentclass_attribute.name}</td>
                <td>{attribute_view_gui attribute=$node.data_map.phone_2}</td>
            </tr>
            <tr><td colspan="2"><p> </p></td></tr>
            <tr>
                <td colspan="2">{attribute_view_gui attribute=$node.data_map.invitation}
{$node.data_map.invitation.contentclass_attribute.name}</td>
            </tr>
            <tr>
                <td colspan="2">{attribute_view_gui attribute=$node.data_map.agree} I agree to the terms and conditions *)</td>
            </tr>
            <tr>
                <td colspan="2">
                    <p> </p>
                    <input type="submit" class="defaultbutton" name="ActionCollectInformation" value="Send" />
                    <input type="hidden" name="ContentNodeID" value="{$node.node_id}" />
                    <input type="hidden" name="ContentObjectID" value="{$node.object.id}" />
                    <input type="hidden" name="ViewMode" value="full" />
                </td>
            </tr>
        </table>
        </form>

V. van Velzen

Wednesday 31 March 2010 11:27:52 pm

Can anyone tell me if the template is OK so I can exclude that from being the reason why the form isn't working as it should?

TIA,

Vivienne

Nicolas Pastorino

Thursday 01 April 2010 12:48:01 am

Hi Vivienne,

From your settings above, the template requested when viewing 'content/collectedinfo/3309' should be :
content/collectedinfo/myform.tpl

You will need to have a few things enabled in site.ini.append.php, if not already the case, before we move on troubleshooting :

[DebugSettings]
DebugOutput=enabled

[TemplateSettings]
Debug=enabled
ShowXHTMLCode=disabled
ShowUsedTemplates=enabled
DevelopmentMode=enabled

Would you mind checking in the list of used templates what "Requested template" reads ?

Other than that, what custom override rules (in override.ini for the concerned siteaccess) are in use ?

Let us know,
Cheers,

--
Nicolas Pastorino
Director Community - eZ
Member of the Community Project Board

eZ Publish Community on twitter: http://twitter.com/ezcommunity

t : http://twitter.com/jeanvoye
G+ : http://plus.tl/jeanvoye

V. van Velzen

Wednesday 14 July 2010 12:28:11 am

Hi Nicolas,

My apologies for the terribly late response. I'm counting on the automatic notifications to warn me of any replies, but apparently they're not always working correctly.

Anyway, on with the problem. First off, I can't enable those settings in my site.ini.append.php, as it is a live server and not in a development environment :-(.

The used templates question: I'm guessing you mean the templates that are mentioned in design -> templates? When I look at this page I see an immense list of templates. Filtering on the class name leaves me with these two:

/content/collectedinfo/myform.tpl design/mysite/templates
/content/collectedinfomail/myform.tpl design/mysite/templates

The custom overrides in my override.ini.append.php regarding this form are:

[myform]
Source=node/view/full.tpl
MatchFile=full/myform.tpl
Subdir=templates
Match[class_identifier]=myform

Does this help?

Kind regards,

Vivienne

Gabriel Finkelstein

Tuesday 27 July 2010 3:14:55 pm

Regarding number 1:

I'm completely sure there's an input missing in your form. Bear in mind that for each attribute, at least one POST variable must be submitted, and in some html form elements, when you leave them empty, then no variable is submitted. Such elements are for example radio buttons and checkboxes. If you use them in your form, then be sure to add a hidden input with value="" with the same name as the radio buttons or checkboxes right before them.

Regarding number 2:

You need to add this in override.ini:

[myform_collectedinfo]
Source=node/view/collectedinfo.tpl
MatchFile=collectedinfo/myform.tpl
Subdir=templates
Match[class_identifier]=myform

You must be logged in to post messages in this topic!

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.