Index: main/plugin-forms/i18n/messages_fr.xml
===================================================================
--- main/plugin-forms/i18n/messages_fr.xml	(revision 29736)
+++ main/plugin-forms/i18n/messages_fr.xml	(working copy)
@@ -219,7 +219,15 @@
 	<message key="PLUGINS_FORMS_FORMS_EDITOR_REDIRECTION_DESCRIPTION">Cette option permet de choisir une page dans le plan du site vers laquelle le visiteur est redirigé après la soumission du formulaire.&lt;br/&gt;Par défaut, une page hors navigation est générée.</message>
 	<message key="PLUGINS_FORMS_FORMS_EDITOR_REDIRECTION_DIALOG_TITLE">Page de succès...</message>
 	<message key="PLUGINS_FORMS_FORMS_EDITOR_REDIRECTION_DIALOG_DESCRIPTION">Selectionnez la page vers laquelle le visiteur sera redirigé après sa soumission :</message>
-		
+	<message key="PLUGINS_FORMS_FORMS_EDITOR_AUTOFILL_LABEL">Pré-remplissage</message>
+    <message key="PLUGINS_FORMS_FORMS_EDITOR_AUTOFILL_DESC">Lorsqu'on est sur une page à accès limité, le champ se remplit automatiquement en fonction des informations de l'utilisateur connecté.</message>
+    <message key="PLUGINS_FORMS_FORMS_EDITOR_AUTOFILL_NONE">Aucun</message>
+    <message key="PLUGINS_FORMS_FORMS_EDITOR_AUTOFILL_LASTNAME">Nom</message>
+    <message key="PLUGINS_FORMS_FORMS_EDITOR_AUTOFILL_FIRSTNAME">Prénom</message>
+    <message key="PLUGINS_FORMS_FORMS_EDITOR_AUTOFILL_FULLNAME">Nom complet</message>
+    <message key="PLUGINS_FORMS_FORMS_EDITOR_AUTOFILL_ID">Identifiant</message>
+    <message key="PLUGINS_FORMS_FORMS_EDITOR_AUTOFILL_EMAIL">Email</message>
+    	
 	<message key="PLUGINS_FORMS_FORMS_EDITOR_LAYOUT_GALLERY_SIMPLETEXT_ERROR_TITLE">Impossible de réarranger</message>
 	<message key="PLUGINS_FORMS_FORMS_EDITOR_LAYOUT_GALLERY_SIMPLETEXT_ERROR_DESCRIPTION">Les éléments du formulaire n'ont pas pu être réarrangés correctement.</message>
 	<message key="PLUGINS_FORMS_FORMS_EDITOR_LAYOUT_GALLERY_SIMPLETEXT_ERROR_DETAILS">Balise inconnue :</message>
Index: main/plugin-forms/i18n/messages_en.xml
===================================================================
--- main/plugin-forms/i18n/messages_en.xml	(revision 29736)
+++ main/plugin-forms/i18n/messages_en.xml	(working copy)
@@ -219,7 +219,15 @@
 	<message key="PLUGINS_FORMS_FORMS_EDITOR_REDIRECTION_DESCRIPTION">This option allow to choose a page in the sitemap: the visitor will be redirected there after its submission.&lt;br/&gt;By default, a page is generated for the redirection.</message>
 	<message key="PLUGINS_FORMS_FORMS_EDITOR_REDIRECTION_DIALOG_TITLE">Success page...</message>
 	<message key="PLUGINS_FORMS_FORMS_EDITOR_REDIRECTION_DIALOG_DESCRIPTION">Select the page where the visitor will be redirected to after its submission:</message>
-	
+	<message key="PLUGINS_FORMS_FORMS_EDITOR_AUTOFILL_LABEL">Autofill</message>
+    <message key="PLUGINS_FORMS_FORMS_EDITOR_AUTOFILL_DESC">When we are on a restricted page, the input automatically fills with the information of the connected user.</message>
+    <message key="PLUGINS_FORMS_FORMS_EDITOR_AUTOFILL_NONE">None</message>
+    <message key="PLUGINS_FORMS_FORMS_EDITOR_AUTOFILL_LASTNAME">Lastname</message>
+    <message key="PLUGINS_FORMS_FORMS_EDITOR_AUTOFILL_FIRSTNAME">Firstname</message>
+    <message key="PLUGINS_FORMS_FORMS_EDITOR_AUTOFILL_FULLNAME">Fullname</message>
+    <message key="PLUGINS_FORMS_FORMS_EDITOR_AUTOFILL_ID">Login</message>
+    <message key="PLUGINS_FORMS_FORMS_EDITOR_AUTOFILL_EMAIL">Mail</message>
+    
 	<message key="PLUGINS_FORMS_FORMS_EDITOR_LAYOUT_GALLERY_SIMPLETEXT_ERROR_TITLE">Impossible to refactor</message>
 	<message key="PLUGINS_FORMS_FORMS_EDITOR_LAYOUT_GALLERY_SIMPLETEXT_ERROR_DESCRIPTION">Forms element could not be reordered correctly.</message>
 	<message key="PLUGINS_FORMS_FORMS_EDITOR_LAYOUT_GALLERY_SIMPLETEXT_ERROR_DETAILS">Unknown element: </message>
Index: main/plugin-forms/resources/js/org/ametys/forms/Conversions.i18n.js
===================================================================
--- main/plugin-forms/resources/js/org/ametys/forms/Conversions.i18n.js	(revision 29736)
+++ main/plugin-forms/resources/js/org/ametys/forms/Conversions.i18n.js	(working copy)
@@ -251,6 +251,7 @@
 				var minvalue = / form_minvalue="([^"]*)"/.test(s) ? RegExp.$1 : "";
 				var maxvalue = / form_maxvalue="([^"]*)"/.test(s) ? RegExp.$1 : "";
 				var regexptype = / form_regexptype="([^"]*)"/.test(s) ? RegExp.$1 : "";
+				var autofill = / form_autofill="([^"]*)"/.test(s) ? RegExp.$1 : "";
 				var regexp = / form_regexp="([^"]*)"/.test(s) ? RegExp.$1 : "";
 				
 
@@ -298,7 +299,7 @@
 
 				switch (className)
 				{
-					case "form_input_text": 	return '&lt;input type="text"' 		+ ' name="' + name + '" id="' + id + '" mandatory="' + mandatory + '" width="' + width + '" confirmation="' + confirmation + '" value="' + value + '" maxvalue="' + maxvalue + '" minvalue="' + minvalue + '" regexptype="' + regexptype + '" regexp="' + regexp + '"/>';
+					case "form_input_text": 	return '&lt;input type="text"' 		+ ' name="' + name + '" id="' + id + '" mandatory="' + mandatory + '" width="' + width + '" confirmation="' + confirmation + '" value="' + value + '" maxvalue="' + maxvalue + '" minvalue="' + minvalue + '" regexptype="' + regexptype + '" autofill="' + autofill + '" regexp="' + regexp + '"/>';
 					case "form_input_submit": 	return '&lt;input type="submit"' 	+ ' name="' + name + '" id="' + id + '" width="' + width + '" value="' + value + '"/>';
 					case "form_input_reset": 	return '&lt;input type="reset"' 	+ ' name="' + name + '" id="' + id + '" width="' + width + '" value="' + value + '"/>';
 					
@@ -383,6 +384,7 @@
 				var maxvalue = (type == "text" || type == "password") &amp;&amp; / maxvalue="([^"]*)"/.test(s) ? ' form_maxvalue="' + RegExp.$1 + '"' : '';
 				var regexp = (type == "text" || type == "password") &amp;&amp; / regexp="([^"]*)"/.test(s) ? ' form_regexp="' + RegExp.$1 + '"' : '';
 				var regexptype = type == "text" &amp;&amp; / regexptype="([^"]*)"/.test(s) ? ' form_regexptype="' + RegExp.$1 + '"' : '';
+				var autofill = type == "text" &amp;&amp; / autofill="([^"]*)"/.test(s) ? ' form_autofill="' + RegExp.$1 + '"' : '';
 
 				var additionnalCSS = "";
 				if (checked != "" &amp;&amp; type == "radio") 
@@ -394,7 +396,7 @@
 					additionnalCSS += " form_input_checkbox_checked";
 				}
 				
-				return org.ametys.forms._createHTML(name, id, 'class="form_input_' + type + additionnalCSS + '" input_' + type + '="input_' + type + '"' + width + value + maxsize + mandatory + confirmation + fileextension + minvalue + maxvalue + regexp + regexptype + checked);
+				return org.ametys.forms._createHTML(name, id, 'class="form_input_' + type + additionnalCSS + '" input_' + type + '="input_' + type + '"' + width + value + maxsize + mandatory + confirmation + fileextension + minvalue + maxvalue + regexp + regexptype + autofill + checked);
 			}
 	);
 	
Index: main/plugin-forms/resources/js/org/ametys/forms/Components.i18n.js
===================================================================
--- main/plugin-forms/resources/js/org/ametys/forms/Components.i18n.js	(revision 29736)
+++ main/plugin-forms/resources/js/org/ametys/forms/Components.i18n.js	(working copy)
@@ -1477,6 +1477,29 @@
 		
 		tinyMCE.activeEditor.execCommand('mceBeginUndoLevel');
 		input.setAttribute("form_regexptype", record.data.id);
+		
+		var inputAutoFill = org.ametys.forms._currentAutoFillNode;
+		switch (record.data.id) 
+		{
+		case "email": 
+			if (inputAutoFill.getAttribute("form_autofill") != "email" &amp;&amp;
+			    inputAutoFill.getAttribute("form_autofill") != "none"
+			)
+			{
+				inputAutoFill.setAttribute("form_autofill", "none");
+			}
+			break; 
+		case "text": 
+			if (inputAutoFill.getAttribute("form_autofill") == "email")
+			{
+				inputAutoFill.setAttribute("form_autofill", "none");
+			}
+			break;
+		default: 
+			inputAutoFill.setAttribute("form_autofill", "none");
+			break; 
+		}
+		
 		tinyMCE.activeEditor.execCommand('mceEndUndoLevel');
 		tinyMCE.activeEditor.execCommand('mceSelectNode', false, input);
 	}
@@ -1507,6 +1530,61 @@
 }
 
 /**
+ * Autofill
+ */
+org.ametys.forms.ApplyAutoFill = function (combo, record, index)
+{
+	var input = org.ametys.forms._currentAutoFillNode;
+	if (input)
+	{
+		tinyMCE.focus();
+		
+		tinyMCE.activeEditor.execCommand('mceBeginUndoLevel');
+		input.setAttribute("form_autofill", record.data.id);
+		
+		var inputRegExp = org.ametys.forms._currentRegexpTypeNode;
+		switch (record.data.id) 
+		{
+		case "email": 
+			inputRegExp.setAttribute("form_regexptype", "email");
+			break; 
+		case "none": 
+			break;
+		default: 
+			inputRegExp.setAttribute("form_regexptype", "text");
+			break; 
+		}
+		
+		tinyMCE.activeEditor.execCommand('mceEndUndoLevel');
+		tinyMCE.activeEditor.execCommand('mceSelectNode', false, input);
+	}
+}
+
+org.ametys.forms.AutoFillListener = function(combo, target, node)
+{
+	var input = org.ametys.forms._getInput(target, node);
+
+	org.ametys.forms._currentAutoFillNode = input;
+
+	var off = target == null || node == null;
+	if (!input || input.getAttribute("input_text") == null)
+	{
+		combo.getElements().each(function(element) {element.setDisabled(true);});
+	}
+	else
+	{
+		combo.getElements().each(
+				function(element) 
+				{
+					element.setDisabled(false);
+					element.setValue(input.getAttribute("form_autofill") || "none");
+				}
+			);
+	}
+	
+}
+
+/**
  * DROP DOWN VALUES EDITOR
  */
 org.ametys.forms.DropDownValueAction = function(controlId, controlConfiguration, controlPluginName)
Index: main/plugin-forms/resources/js/org/ametys/forms/Forms.i18n.js
===================================================================
--- main/plugin-forms/resources/js/org/ametys/forms/Forms.i18n.js	(revision 29736)
+++ main/plugin-forms/resources/js/org/ametys/forms/Forms.i18n.js	(working copy)
@@ -454,7 +454,7 @@
 	var form = org.ametys.forms._currentFormProcessingEmailsNode;
 	if (form != null)
 	{
-		if ((value != '') &amp;&amp; (!/^(\w+)([-+.][\w]+)*@(\w[-\w]*\.){1,5}([A-Za-z]){2,4}([ ,;\r\n]*(\w+)([-+.][\w]+)*@(\w[-\w]*\.){1,5}([A-Za-z]){2,4})*$/.test(value)))
+		if ((value != '') &amp;&amp; (!/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,})([ ,;\r\n]*([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,}))*$/.test(value)))
 		{
 			// error
 			org.ametys.msg.ErrorDialog("<i18n:text i18n:key="PLUGINS_FORMS_FORMS_EDITOR_CMS_EMAILPROCESSING_ERROR_TITLE"/>", 
Index: main/plugin-forms/plugin.xml
===================================================================
--- main/plugin-forms/plugin.xml	(revision 29736)
+++ main/plugin-forms/plugin.xml	(working copy)
@@ -1291,6 +1291,39 @@
 				</scripts>
     		</extension>
     		
+    		<extension id="org.ametys.plugins.forms.AutoFill"
+                       point="org.ametys.cms.workspace.ribbon.RibbonControlsManager"
+                       class="org.ametys.cms.clientsideelement.styles.ParaStyleClientSideElement">
+                <action class="org.ametys.cms.control.ComboBoxField">
+                    <param name="action">org.ametys.forms.ApplyAutoFill</param>
+                    <param name="selection-listener">org.ametys.forms.AutoFillListener</param>
+                    <param name="width">100</param>
+                    <param name="width-very-small">80</param>
+                    <param name="label-width">80</param>
+                    <param name="label" i18n="true">PLUGINS_FORMS_FORMS_EDITOR_AUTOFILL_LABEL</param>
+                    <param name="default-description" i18n="true">PLUGINS_FORMS_FORMS_EDITOR_AUTOFILL_DESC</param>
+                    
+                    <param name="count">6</param>
+                    <param name="0-label" i18n="true">PLUGINS_FORMS_FORMS_EDITOR_AUTOFILL_NONE</param>
+                    <param name="0-value">none</param>
+                    <param name="1-label" i18n="true">PLUGINS_FORMS_FORMS_EDITOR_AUTOFILL_FIRSTNAME</param>
+                    <param name="1-value">firstname</param>
+                    <param name="2-label" i18n="true">PLUGINS_FORMS_FORMS_EDITOR_AUTOFILL_LASTNAME</param>
+                    <param name="2-value">lastname</param>
+                    <param name="3-label" i18n="true">PLUGINS_FORMS_FORMS_EDITOR_AUTOFILL_FULLNAME</param>
+                    <param name="3-value">fullname</param>
+                    <param name="4-label" i18n="true">PLUGINS_FORMS_FORMS_EDITOR_AUTOFILL_ID</param>
+                    <param name="4-value">login</param>
+                    <param name="5-label" i18n="true">PLUGINS_FORMS_FORMS_EDITOR_AUTOFILL_EMAIL</param>
+                    <param name="5-value">email</param>
+                </action>
+                <right>Runtime_Rights_Forms_Edit</right>
+                <scripts>
+                    <file>js/org/ametys/forms/Forms.i18n.js</file>
+                    <file>js/org/ametys/forms/Components.i18n.js</file>
+                </scripts>
+            </extension>
+    		
     		<extension id="org.ametys.plugins.forms.InputChecked"
     				   point="org.ametys.cms.workspace.ribbon.RibbonControlsManager"
     				   class="org.ametys.runtime.ui.impl.StaticContextualClientSideElement">
Index: main/plugin-forms/stylesheets/docbook2html.xsl
===================================================================
--- main/plugin-forms/stylesheets/docbook2html.xsl	(revision 29736)
+++ main/plugin-forms/stylesheets/docbook2html.xsl	(working copy)
@@ -221,6 +221,12 @@
 				<xsl:if test="@type = 'text' and @regexptype = 'time'"><xsl:attribute name="maxlength">5</xsl:attribute></xsl:if>
 				<xsl:if test="@type = 'text' and @regexptype = 'datetime'"><xsl:attribute name="maxlength">16</xsl:attribute></xsl:if>
 			</input>
+			<xsl:if test="@autofill != 'none'">
+				<xsl:call-template name="fill-user-input">
+	                <xsl:with-param name="id" select="@id"/>
+	                <xsl:with-param name="field" select="@autofill"/>
+	            </xsl:call-template>
+			</xsl:if>
 		</div>
 		<div class="field-end"/>
 		
@@ -376,7 +382,7 @@
 				}
 			</xsl:when>
 			<xsl:when test="@regexptype = 'email'">
-				if (value_<xsl:value-of select="$valueId"/> != '' &amp;&amp; !/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/.test(value_<xsl:value-of select="$valueId"/>))
+				if (value_<xsl:value-of select="$valueId"/> != '' &amp;&amp; !/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,})+$/.test(value_<xsl:value-of select="$valueId"/>))
 				{
 					error("<xsl:value-of select="@id"/>", "text", "<i18n:text i18n:key="PLUGINS_FORMS_FORMS_RENDER_ERROR_TEXT_EMAIL" i18n:catalogue="plugin.forms"/>");
 				}
Index: main/plugin-forms/cms-ribbon.xml
===================================================================
--- main/plugin-forms/cms-ribbon.xml	(revision 29736)
+++ main/plugin-forms/cms-ribbon.xml	(working copy)
@@ -281,9 +281,10 @@
 				<group label="plugin.forms:RIBBON_TABS_TAB_FORM_INPUT_TEXT_RULES_LABEL" icon="">
 					<large/>
 					<medium>
-						<layout size="small" align="middle">
+						<layout size="small" align="top">
 							<control id="org.ametys.plugins.forms.InputMandatory"/>
 							<control id="org.ametys.plugins.forms.InputPasswordConfirmation"/>
+                            <control id="org.ametys.plugins.forms.AutoFill"/>
 						</layout>
 						<layout size="small" align="top" cols="2">
 							<control id="org.ametys.plugins.forms.RegExpType" colspan="2"/>
@@ -293,9 +294,10 @@
 						</layout>
 					</medium>
 					<small>
-						<layout size="small" align="middle">
+						<layout size="small" align="top">
 							<control id="org.ametys.plugins.forms.InputMandatory"/>
 							<control id="org.ametys.plugins.forms.InputPasswordConfirmation"/>
+                            <control id="org.ametys.plugins.forms.AutoFill"/>
 						</layout>
 						<layout size="very-small" align="top" cols="2">
 							<control id="org.ametys.plugins.forms.RegExpType" colspan="2"/>
