eZ Community » Forums » Developer » form and input parameters
expandshrink

form and input parameters

form and input parameters

Tuesday 19 June 2012 2:15:00 pm - 1 reply

I use the form "form action={"/content/action"|ezurl}" to create records in my class but I want to insert news input paramters to this form and I d'ont know how to proceed.

 <form action={"/content/action"|ezurl} name="CreateNewNomdetaclasse" method="post">
                     <input type="hidden" value="{$inputparam}" name="input parameter"/>
                    <input type="hidden" value="fre-FR" name="ContentLanguageCode"/>
                    <input type="hidden" value="122" name="ContentNodeID"/>
                    <input type="hidden" value="122" name="NodeID"/>                    
                    <input type="hidden" value="acg_rubrique" name="ClassIdentifier"/> 
                    <input type="submit" title ="Ajouter" id="ajouter" name="NewButton" value=""/>        
               </form>

how to retrieve this setting {$inputparam} in my form to feed my field?

thanks

Tuesday 19 June 2012 8:10:48 pm

Hi Aurelie,

You'll need to find the content object attribute ID for the attribute you want to input data into. Check out the standard/base/templates/content/edit_attribute.tpl for an idea. Basically you'd want something like this:

<input type="hidden" name="ContentObjectAttribute_id[]" value="{$ContentObjectAttribute:item.id}" />
        {attribute_edit_gui attribute_base=$attribute_base attribute=$ContentObjectAttribute:item view_parameters=$view_parameters}

Hope that helps.
Lara

expandshrink

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

36 542 Users on board!

Forums menu

Proudly Developed with from