Jahia in English > How to use choicelistinitilise...

0 (0 Good)
0 (0 Bad)

How to use choicelistinitiliser in a form

by  kissenlall »  2013/03/06 20:33

I wanted to know if there was a way to use a custom choiselistinitialiser in a form that I am developing?

Thanks

  • How to use choicelistinitiliser in a form
    2013/03/06 20:33

    kissenlall <p> I wanted to know if there was a way to use a custom choiselistinitialiser in a form that I am developing?</p> <p> Thanks</p>

  • Number of messages  7
    Registration date Mar 6, 2013
    0 (0 Good)
    0 (0 Bad)

    Re: How to use choicelistinitiliser in a form

    by  cedmail »  2013/03/11 14:05

    Hi kissenlall,

     

    Here a documentation on how to customize your own choicelist initializer/render in Jahia 6.5 and newer versions.

     

    https://www.jahia.com/community/documentation/jahiapedia-v6_6_1/initializers_renderers/initializers.html

     

    Regards

    misterCedricMailleux

    Cedric Mailleux (cedmail)

    Number of messages  11
    Registration date
    0 (0 Good)
    0 (0 Bad)

    Re: How to use choicelistinitiliser in a form

    by  cedmail »  2013/03/11 14:11

    To go further or call an initializer inside your own jsp files, you can use the tag propertyInitializer.

     

    Here an example of how to get the list of country :

     

    <jcr:propertyInitializers nodeType="jnt:signature" name="signerCountry" var="countryInit"/>

     

     

    
    
    <select id="country-${id}" class="country" name="signerCountry">
                                            <option value=""><fmt:message key="petition.label.country" /></option>
                                            <c:forEach items="${countryInit}" var="country">
                                                <option style="background-image:url(${country.properties.image});" value="${country.value.string}">${country.displayName}</option>
                                            </c:forEach>
                                        </select>
     
    Regards,
    misterCedricMailleux

    Cedric Mailleux (cedmail)

    Number of messages  11
    Registration date
    Contact
    Share
    Feedback

    Get in touch

    Whether you are a current user or if you are just evaluating Jahia, we are here to help.

    Contact us

    Share this page