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.
<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><!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>[!MyForm? &tpl=`MyChunkForm` &gab=`MyChunkEmail` &format=`contacte:Contacte:listbox:1` &sendTo=`[email protected]` &object=`My object`!]
thank you for help me
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
&format=`name:Name:string:1,email:email:email:1,message:message:html:1`
&format doesn’t seem to do anything for my call, which includeswhere ’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.&format=`name:Name:string:1,email:email:email:1,message:message:html:1`
[*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?
<textarea id="tvmessage" name="tvmessage" style="width:100%; height:300px;"></textarea>
#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;
}
This discussion is closed to further replies. Keep calm and carry on.