We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 2136
    • 134 Posts
    is it possible to use the rich text widget with eform? i realize i can allow peeps to use html for formatting, but a rich text editor would be truly cool.

    thank you.
      Sorry - not using ModX anymore 01/01/2007
      • 32963
      • 1,732 Posts
      Quote from: arphaus at Oct 07, 2006, 05:50 PM

      is it possible to use the rich text widget with eform? i realize i can allow peeps to use html for formatting, but a rich text editor would be truly cool.

      thank you.

      Hi,

      In eForm 2.0 with this will be a piece of cake but for now you can do by using a TV. See the RichText TV widget
        xWisdom
        www.xwisdomhtml.com
        The fear of the Lord is the beginning of wisdom:
        MODx Co-Founder - Create and do more with less.
        • 2136
        • 134 Posts
        thanks - i did find that, which is what initiated my question, but i don’t understand how to call it. my forum & google searches have proven fruitless so far.
          Sorry - not using ModX anymore 01/01/2007
          • 7901
          • 3 Posts
          Hello all, (scuse me for my bad english)

          I try to use eform but with selection list i don’t have the response in my chunk

          i post mychunkform
          <form method="post" action="[~[*id*]~]" name="monformulaire">
              [+alarme+]
              <table width="300">
                  <tbody>
                      <tr>
                          <td >Souhaitez vous être contacter par:</td>
          
                         <td><select name="contacte"/>
          <option selected value="aucuneselection" [+contacte:aucuneselection+]>Faite votre sélection</option>
          <option value="Tel" [+contacte:tel:+]>Téléphone</option>
          <option value="fax" [+contacte:fax+]>Fax</option>
          <option value="email" [+contacte:email+]>E-mail</option>
          
          </select>
          </td>
                      </tr>
                      <tr>
                          <td class="[+classe_nom+]">Compagnie :</td>
                          <td><input type="text" maxlength="32" size="25" value="[+compagnie+]" name="compagnie" /> *</td>
                      </tr>
                      <tr>
                          <td class="[+classe_prenom+]">Personne a contacter :</td>
                          <td><input type="text" maxlength="32" size="25" value="[+nom+]" name="nom" /> *</td>
                      </tr>
                      <tr>
                          <td class="[+classe_tel+]">Tel :</td>
                          <td><input type="text" maxlength="32" size="25" value="[+tel+]" name="tel" /> *</td>
                      </tr>
                      <tr>
                          <td class="[+classe_fax+]">Fax :</td>
                          <td><input type="text" maxlength="32" size="25" value="[+fax+]" name="fax" /> </td>
                      </tr>
                      <tr>
                          <td class="[+classe_email+]">E-mail :</td>
                          <td><input type="text" maxlength="32" size="25" value="[+email+]" name="email" /> *</td>
                      </tr>
                      <tr>
                          <td class="[+classe_site+]">Site Web :</td>
                          <td><input type="text" maxlength="50" size="25" value="[+site+]" name="site" /> </td>
                      </tr>
                      <tr>
                          <td class="[+classe_adresse+]">Adresse :</td>
                          <td><input type="text" maxlength="100" size="25" value="[+adresse+]" name="adresse" /> </td>
                      </tr>
                      <tr>
                          <td class="[+classe_province+]">Province :</td>
                          <td><input type="text" maxlength="32" size="25" value="[+province+]" name="province" /> </td>
                      </tr>
                      <tr>
                          <td class="[+classe_postal+]">Code Postal :</td>
                          <td><input type="text" maxlength="32" size="25" value="[+postal+]" name="postal" /> </td>
                      </tr>
                      <tr>
                          <td class="[+classe_fax+]">Pays :</td>
                          <td><input type="text" maxlength="32" size="25" value="[+pays+]" name="pays" /> </td>
                      </tr>
                      <tr>
                          <td class="[+classe_fax+]">Type de Produit à emballer :</td>
                          <td><input type="text" maxlength="50" size="25" value="[+type+]" name="type" /> *</td>
                      </tr>
                      <tr>
                                      <td >Type d'emballage:</td>
          
                         <td><select name="embal"/>
          <option selected value="aucuneselection" [+embal:aucuneselection+]>Faite votre sélection</option>
          <option value="Tel" [+embal:plastique+]>Plastique</option>
          <option value="fax" [+embal:contenant+]>Contenant</option>
          <option value="email" [+embal:autre+]>Autre</option>
          
          </select>*</td>
                      </tr>
                      <tr>
                          <td class="[+classe_message+]">Message :</td>
                          <td><textarea rows="10" name="message">[+message+]</textarea>  				*</td>
                      </tr>
                  </tbody>
              </table>
              <input type="submit" value="Envoyer" name="ok" class="submit" />
          </form>



          MyChunkEmail

          <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
          "http://www.w3.org/TR/html4/loose.dtd">
          <html>
          <head>
          <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
          <title>Mail</title>
          <style type="text/css">
          <!--
          body {
          	/*background-color: #EEECE0;*/
          }
          .Style1 {
          	font-family: Arial, Helvetica, sans-serif;
          	font-size: 12px;
          }
          .Style2 {
          	font-family: Arial, Helvetica, sans-serif;
          	font-size: 11px;
          	font-weight: bold;
          }
          .Style3 {
          	font-family: Arial, Helvetica, sans-serif;
          	font-size: 11px;
          	font-weight: bold;
          	color: #B50C00;
          }
          .Style4 {
          	font-family: Arial, Helvetica, sans-serif;
          	font-size: 13px;
          	font-weight: bold;
          }
          -->
          </style>
          </head>
          
          <body>
          <table width="515" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td colspan="2"> </td>
            </tr>
            <tr>
              <td width="15"> </td>
              <td height="50" align="center" valign="top"><br>
                  <table width="495" height="28" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                      <td align="left"><span class="Style4">Demande d'informations</span></td>
                    </tr>
                  </table>
                  <br>
                  <table width="500" border="0" cellpadding="20" cellspacing="0">
                    <tr>
                      <td align="left" valign="top" bgcolor="#F9FAF4">
          			<p class="Style1">
          
                        La personne souhaite etre contacté par <strong>[+contacte+]</strong><br>
                        Compagnie: <strong>[+compagnie+]</strong><br>
                        Personne à contacter: <strong>[+nom+]</strong><br>
                        Tel : <strong>[+tel+]</strong><br>
                        Fax: <strong>[+fax+]</strong><br>
                        E-mail : <strong>[+email+]</strong><br>
                        Site Web : <strong>[+site+]</strong><br>
                        Adresse : <strong>[+adresse+]</strong><br>
                        Province : <strong>[+province+]</strong><br>
                        Code Postal : <strong>[+postal+]</strong><br>
                        Pays: <strong>[+pays+]</strong><br>
                        Type de produit à emballer: <strong>[+type+]</strong><br>
                        Selection type emballage: <strong>[+embal+]</strong><br>
                        Message :<br> 
                        <strong>[+message+]</strong>              <br>              
                        <br>
          <br>            
                      </p>
                      </td>
                    </tr>
                  </table>
            </td>
            </tr>
          </table>
          </body>
          </html>



          I call this with:

          [!MyForm? &tpl=`MyChunkForm` &gab=`MyChunkEmail` &format=`contacte:Contacte:listbox:1` &sendTo=`[email protected]` &object=`My object`!]



          All work but my selection list not !! sad thank you for help me
            • 2136
            • 134 Posts
            Quote from: xwisdom at Oct 08, 2006, 03:52 PM

            Hi,

            In eForm 2.0 with this will be a piece of cake but for now you can do by using a TV. See the RichText TV widget

            this is cryptic. i can create a tv and use the richtext widget, but how does this relate to eform?
              Sorry - not using ModX anymore 01/01/2007
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              I would imagine that you would call the TV in your eForm template chunk.
                Studying MODX in the desert - http://sottwell.com
                Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                Join the Slack Community - http://modx.org
                • 2136
                • 134 Posts
                thanks, i can call it but how does

                [*formRichTextTV*]

                relate to

                <textarea name="message" id="cfMessage" rows="4" cols="80">[+message+]</textarea>?

                how can i assign a name or id, where would the [+message+] part go?
                  Sorry - not using ModX anymore 01/01/2007
                  • 2136
                  • 134 Posts
                  &format doesn’t seem to do anything for my call, which includes
                  &format=`name:Name:string:1,email:email:email:1,message:message:html:1`
                  where ’name,’ ’email’ and ’message’ are the field names. it doesn’t seem to matter whether the fields are empty or not. just to see i tried all 0s instead of all 1s and the message was sent all the same.
                    Sorry - not using ModX anymore 01/01/2007
                    • 32963
                    • 1,732 Posts
                    Quote from: arphaus at Oct 15, 2006, 05:20 PM

                    &format doesn’t seem to do anything for my call, which includes
                    &format=`name:Name:string:1,email:email:email:1,message:message:html:1`
                    where ’name,’ ’email’ and ’message’ are the field names. it doesn’t seem to matter whether the fields are empty or not. just to see i tried all 0s instead of all 1s and the message was sent all the same.

                    What version of eform are you using?

                    @TV inside eForm....


                    [*formRichTextTV*]

                    relate to

                    <textarea name="message" id="cfMessage" rows="4" cols="80">[+message+]</textarea>?

                    how can i assign a name or id, where would the [+message+] part go?

                    You can create a richtext-tv called message then and add [+tvmessage+] inside the default value. Note that the form field name will be prefixed with the letters "tv".
                    You can then insert [*message*] inside your <form>. The textarea rendered tv should be displayed as:

                    <textarea id="tvmessage" name="tvmessage" style="width:100%; height:300px;"></textarea>

                    Note: I am not sure if you will be able to have the default/postback values displayed inside your richtext tv when working with the current release. It should not be difficult to modify eForm 1.3+ to get it supporting this feature.

                    To do a quick test try replacing the efLoadTemplate at line 804 in eform.inc.php

                    #loads tempate from chunk or document
                    function efLoadTemplate($tpl){
                    	global $modx;
                    	if (strlen($tpl)<50){
                    		if( is_numeric($tpl) ){
                    			//try unpublished docs first
                    			$tpl = ( $doc=$modx->getDocument($tpl,'content',0) )? $doc['content'] : '';
                    			if(!$tpl) $tpl = ( $doc=$modx->getDocument($tmp,'content',1) )? $doc['content'] : false;
                    		}else if($tpl)
                    			$tpl = ( $chunk=$modx->getChunk($tpl) )? $chunk : false;
                    	}
                    	// merge content fields into template
                    	if(strpos($tpl,'[*')!==false) $tpl = $modx->mergeDocumentContent($tpl);
                    	return $tpl;
                    }
                      xWisdom
                      www.xwisdomhtml.com
                      The fear of the Lord is the beginning of wisdom:
                      MODx Co-Founder - Create and do more with less.
                      • 2136
                      • 134 Posts
                      thanks very much - i’ll give it a go tomorrow. my brain says ’uncle’ tongue
                        Sorry - not using ModX anymore 01/01/2007

                      This discussion is closed to further replies. Keep calm and carry on.