Jahia Template Forum > Problems in form...

0 (0 Good)
0 (0 Bad)

Problems in form modifications

by  mllejulie »  2012/07/18 07:39

Hi all !!

Fisrt, I'm sorry but my english was not very good. I hope you understand me !!

I work in the form. I have to make the title 'modifiable' and I have to add a field (type : choiceList or radioButtons). If this field equals 'I come', I have to send a mail and if this field equals 'I don't come' I have to send an other mail.

For the moment, i have create the field named 'sendMail' and that is the description in the file definitions.cnd :

smallText    sendMail (choiceList) = 'I come' < 'I come', 'I don't come'

If this type is correct or it's preferable to use radioButtons ? If I forced to use this, how to use it ?

Secondly, how to retrieve this field in my file formDisplay.jsp ?

Hoping to have a rapid response

Julie

  • Problems in form modifications
    2012/07/18 07:39

    mllejulie <p> Hi all !!</p> <p> Fisrt, I&#39;m sorry but my english was not very good. I hope you understand me !!</p> <p> I work in the form. I have to make the title &#39;modifiable&#39; and I have to add a field (type : choiceList or radioButtons). If this field equals &#39;I come&#39;, I have to send a mail and if this field equals &#39;I don&#39;t come&#39; I have to send an other mail.</p> <p> For the moment, i have create the field named &#39;sendMail&#39; and that is the description in the file definitions.cnd :</p> <p> smallText &nbsp; &nbsp;sendMail (choiceList) = &#39;I come&#39; &lt; &#39;I come&#39;, &#39;I don&#39;t come&#39;</p> <p> If this type is correct or it&#39;s preferable to use radioButtons ? If I forced to use this, how to use it ?</p> <p> Secondly, how to retrieve this field in my file formDisplay.jsp ?</p> <p> Hoping to have a rapid response</p> <p> Julie</p>

  • Number of messages  6
    Registration date Jul 18, 2012
    0 (0 Good)
    0 (0 Bad)

    Re : Problems in form modifications

    by  faissah »  2012/07/20 19:12

    Hello mllejulie,

    Your english is actually pretty good!

    I think that you should review your approach. In the definition.cnd file, you only set the field that will be editable when creating the content in the Edit mode.

    In your component, when creating it on the page, the only editable field would be the title, so you don't need anything else.

    smallText    sendMail (choiceList) = 'I come' < 'I come', 'I don't come'

    This line would mean that when creating the content, the person creating it would have to set it to 'I come' or 'I don't come'. I believe you want the user of the website to do that. So in fact you don't need this line. You should only put 'I come', 'I don't come' in formDisplay.jsp.

    In form display, put your form with the radio buttons 'I come', 'I don't come' and some javascript that would send the emai.

    The only editable parameter that you to need in the JSP would be the titlle. In your jsp you can retrieve it with this syntax:

    ${currentNode.properties.<name of the parameter>.string} since it will probably be a string.

     

    Hope this will help,

    Fabrice

    Fabrice  (faissah)

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

    Re : Re : Problems in form modifications

    by  mllejulie »  2012/08/08 14:57

    Hello,

    I work on forms and I need to change '.class' files to add functionality, let me explain:

    I added fields in the file definitions.cnd and wish to retrieve the value of this field in the file myform.jsp

    From what I understand, to retrieve the value of a field I have to write a function like 'getMonChamp ()' except that these functions are defined in the file formBuilderSmile.class

    How do I open and edit that file? If possible of course!

    Thank you

    Julie

  • Re : Re : Problems in form modifications
    2012/08/08 14:57

    mllejulie <p> Hello,</p> <p> I work on forms and I need to&nbsp;change &#39;.class&#39; files&nbsp;to add functionality, let me explain:</p> <p> I added fields in the file definitions.cnd and wish to retrieve the value of this field in the file myform.jsp</p> <p> From what I understand, to retrieve the value of a field I have to write a function like &#39;getMonChamp ()&#39; except that these functions are defined in the file formBuilderSmile.class</p> <p> How do I open and edit that file? If possible of course!</p> <p> Thank&nbsp;you</p> <p> Julie</p>

  • Number of messages  6
    Registration date Aug 8, 2012
    0 (0 Good)
    0 (0 Bad)

    Re : Re : Re : Problems in form modifications

    by  faissah »  2012/08/10 13:27

    Hello mllejulie,

    You seem to be a java beginner. You .class is the compiled from of .java.

    What you are looking to do is an "action". I suggest that you take a look at this documentation.

    http://www.jahia.com/community/documentation/jahiapedia/actions/actions.html

    Regards,

    Fabrice

    Fabrice  (faissah)

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

    Problems in form modifications

    by  mllejulie »  2012/08/20 14:18

    Hello faissah,

    Thank you for your answer.

    Is it the same documentation for the version 6.1 ?

    Julie

  • Problems in form modifications
    2012/08/20 14:18

    mllejulie <p> Hello faissah,</p> <p> Thank you for your answer.</p> <p> I<span class="short_text" id="result_box" lang="en"><span class="hps">s</span> <span class="hps">it</span> <span class="hps">the same documentation</span> <span class="hps">for the version 6.1</span></span> ?</p> <p> Julie</p>

  • Number of messages  6
    Registration date Aug 20, 2012
    0 (0 Good)
    0 (0 Bad)

    Re : Problems in form modifications

    by  faissah »  2012/08/20 14:57

    No, Jahia 6.1 and 6.5 are quiet different. I suggest that you only rely on Jahia 6.5/6.6 documentation.

    Regards,

    Fabrice

    Fabrice  (faissah)

    Number of messages  264
    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