<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>DXP 7.1- Form- Introducing a new field to capture logged in users details</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=113248385" />
  <subtitle>DXP 7.1- Form- Introducing a new field to capture logged in users details</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=113248385</id>
  <updated>2026-04-04T06:20:39Z</updated>
  <dc:date>2026-04-04T06:20:39Z</dc:date>
  <entry>
    <title>RE: DXP 7.1- Form- Introducing a new field to capture logged in users detai</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113404627" />
    <author>
      <name>Andrew Jardine</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113404627</id>
    <updated>2019-04-25T12:40:11Z</updated>
    <published>2019-04-25T12:40:11Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;Hi Gopal,&amp;nbsp;&lt;br&gt;&lt;br&gt;I think yo uare supposed to use the predefined value from the FormFiteldType. I'm looking at the Liferay source and I can see that the *DDMFormFieldTemplateContextContributor adds this predefined value the parameter map​​​​​​​&lt;pre&gt;&lt;code&gt;@Override
public Map&amp;lt;string, object&amp;gt; getParameters(
   DDMFormField ddmFormField,
   DDMFormFieldRenderingContext ddmFormFieldRenderingContext) {

   Map&amp;lt;string, object&amp;gt; parameters = new HashMap&amp;amp;lt;&amp;amp;gt;();

   parameters.put(
      "predefinedValue",
      GetterUtil.getString(ddmFormField.getPredefinedValue(), ""));

   String predefinedValue = getPredefinedValue(
      ddmFormField, ddmFormFieldRenderingContext);

   if (predefinedValue != null) {
      parameters.put("predefinedValue", predefinedValue);
   }

   return parameters;
}

protected String getPredefinedValue(
   DDMFormField ddmFormField,
   DDMFormFieldRenderingContext ddmFormFieldRenderingContext) {

   LocalizedValue predefinedValue = ddmFormField.getPredefinedValue();

   if (predefinedValue == null) {
      return null;
   }

   return predefinedValue.getString(
      ddmFormFieldRenderingContext.getLocale());
}
&amp;lt;/string,&amp;gt;&amp;lt;/string,&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Andrew Jardine</dc:creator>
    <dc:date>2019-04-25T12:40:11Z</dc:date>
  </entry>
  <entry>
    <title>RE: DXP 7.1- Form- Introducing a new field to capture logged in users detai</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113392943" />
    <author>
      <name>Gopal Satapathy</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113392943</id>
    <updated>2019-04-25T05:42:33Z</updated>
    <published>2019-04-25T05:42:33Z</published>
    <summary type="html">&lt;blockquote&gt;Andrew JardineDid you try this?&lt;br /&gt;&lt;br /&gt;&lt;a href="https://dev.liferay.com/en/develop/tutorials/-/knowledge_base/7-1/form-field-types"&gt;https://dev.liferay.com/en/develop/tutorials/-/knowledge_base/7-1/form-field-types&lt;/a&gt;&lt;/blockquote&gt;Hello Andrew,&lt;br /&gt;&lt;br /&gt;Thanks for the reply.&lt;br /&gt;&lt;br /&gt;Yes i have been looking to the link you have provided. i am able to create a field, but am bit confused on&lt;strong&gt; where to write the code to set the value of that field&lt;/strong&gt;.In mycase i will fetch the logged in user&amp;#39;s say userid/emailaddress. Could you please advise?&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;​​​​​​​Gopal</summary>
    <dc:creator>Gopal Satapathy</dc:creator>
    <dc:date>2019-04-25T05:42:33Z</dc:date>
  </entry>
  <entry>
    <title>RE: DXP 7.1- Form- Introducing a new field to capture logged in users detai</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113261777" />
    <author>
      <name>Andrew Jardine</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113261777</id>
    <updated>2019-04-16T19:36:27Z</updated>
    <published>2019-04-16T19:36:27Z</published>
    <summary type="html">Did you try this?&lt;br /&gt;&lt;br /&gt;&lt;a href="https://dev.liferay.com/en/develop/tutorials/-/knowledge_base/7-1/form-field-types"&gt;https://dev.liferay.com/en/develop/tutorials/-/knowledge_base/7-1/form-field-types&lt;/a&gt;</summary>
    <dc:creator>Andrew Jardine</dc:creator>
    <dc:date>2019-04-16T19:36:27Z</dc:date>
  </entry>
  <entry>
    <title>RE: DXP 7.1- Form- Introducing a new field to capture logged in users detai</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113259763" />
    <author>
      <name>Gopal Satapathy</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113259763</id>
    <updated>2019-04-16T15:35:51Z</updated>
    <published>2019-04-16T15:35:51Z</published>
    <summary type="html">&lt;blockquote&gt;Ramalingaiah. DHi &lt;span style="color: inherit"&gt;&lt;span style="font-family: inherit"&gt;&lt;span style="font-size: 14px;"&gt;Gopal ,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;you can add jsp &lt;br /&gt;​​​​​​​&lt;br /&gt;&lt;br /&gt;&amp;lt;%@ page import=&amp;#34;com.liferay.portal.kernel.model.User&amp;#34;%&amp;gt;&lt;br /&gt;&lt;br /&gt;User Name::&amp;lt;%User userU = themeDisplay.getUser();%&amp;gt;&amp;lt;%=userU.getFullName()%&amp;gt;&lt;br /&gt; Email Id:&amp;lt;%=user.getEmailAddress()%&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Thank you&lt;br /&gt;Ram&lt;/blockquote&gt;&lt;br /&gt;Hello Ramalingaiah,&lt;br /&gt;&lt;br /&gt;My question is specific to &amp;#34;Liferay Forms&amp;#34; which comes with DXP 7.1. I need to know which extension point to use or if i need to create a custom field. Your suggestion is a generic one which i am aware of.&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Gopal</summary>
    <dc:creator>Gopal Satapathy</dc:creator>
    <dc:date>2019-04-16T15:35:51Z</dc:date>
  </entry>
  <entry>
    <title>RE: DXP 7.1- Form- Introducing a new field to capture logged in users detai</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113252503" />
    <author>
      <name>Ramalingaiah. D</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113252503</id>
    <updated>2019-04-16T12:36:03Z</updated>
    <published>2019-04-16T12:36:03Z</published>
    <summary type="html">Hi &lt;span style="color: inherit"&gt;&lt;span style="font-family: inherit"&gt;&lt;span style="font-size: 14px;"&gt;Gopal ,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;you can add jsp &lt;br /&gt;​​​​​​​&lt;br /&gt;&lt;br /&gt;&amp;lt;%@ page import=&amp;#34;com.liferay.portal.kernel.model.User&amp;#34;%&amp;gt;&lt;br /&gt;&lt;br /&gt;User Name::&amp;lt;%User userU = themeDisplay.getUser();%&amp;gt;&amp;lt;%=userU.getFullName()%&amp;gt;&lt;br /&gt; Email Id:&amp;lt;%=user.getEmailAddress()%&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Thank you&lt;br /&gt;Ram</summary>
    <dc:creator>Ramalingaiah. D</dc:creator>
    <dc:date>2019-04-16T12:36:03Z</dc:date>
  </entry>
  <entry>
    <title>RE: DXP 7.1- Form- Introducing a new field to capture logged in users detai</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113251492" />
    <author>
      <name>Gopal Satapathy</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113251492</id>
    <updated>2019-04-16T11:15:18Z</updated>
    <published>2019-04-16T11:15:18Z</published>
    <summary type="html">&lt;blockquote&gt;Ramalingaiah. D&lt;br /&gt;​​​​​​​Hi Gopal,&lt;br /&gt;&lt;br /&gt;Login with admin&amp;gt;&amp;gt;&amp;gt;contral panel&amp;gt;&amp;gt;&amp;gt;&amp;gt; configuration&amp;gt;&amp;gt;&amp;gt;&amp;gt;Custom Fields&amp;gt;&amp;gt;&amp;gt;&amp;gt;user&amp;gt;&amp;gt; right side + buttan  Click &lt;br /&gt;&lt;br /&gt;you can create........&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Thank you &lt;br /&gt;​​​​​​​Ram&lt;/blockquote&gt;Hello Ramalingaiah,&lt;br /&gt;&lt;br /&gt;I think you got it wrong. My intension is not to create custom fields for User, but in &amp;#34;DXP 7.1 Liferay Form&amp;#34; i need to have a form field which can automatically show logged in user&amp;#39;s details when it is added to the form.&lt;br /&gt;&lt;br /&gt;Thanks,&lt;br /&gt;Gopal</summary>
    <dc:creator>Gopal Satapathy</dc:creator>
    <dc:date>2019-04-16T11:15:18Z</dc:date>
  </entry>
  <entry>
    <title>RE: DXP 7.1- Form- Introducing a new field to capture logged in users detai</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113250474" />
    <author>
      <name>Ramalingaiah. D</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113250474</id>
    <updated>2019-04-16T10:48:44Z</updated>
    <published>2019-04-16T10:48:44Z</published>
    <summary type="html">Hi Gopal,&lt;br /&gt;&lt;br /&gt;Login with admin&amp;gt;&amp;gt;&amp;gt;contral panel&amp;gt;&amp;gt;&amp;gt;&amp;gt; configuration&amp;gt;&amp;gt;&amp;gt;&amp;gt;Custom Fields&amp;gt;&amp;gt;&amp;gt;&amp;gt;user&amp;gt;&amp;gt; right side + buttan  Click &lt;br /&gt;&lt;br /&gt;you can create........&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Thank you &lt;br /&gt;​​​​​​​Ram</summary>
    <dc:creator>Ramalingaiah. D</dc:creator>
    <dc:date>2019-04-16T10:48:44Z</dc:date>
  </entry>
  <entry>
    <title>DXP 7.1- Form- Introducing a new field to capture logged in users details</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113248384" />
    <author>
      <name>Gopal Satapathy</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113248384</id>
    <updated>2019-04-16T08:30:50Z</updated>
    <published>2019-04-16T08:30:50Z</published>
    <summary type="html">Hi,&lt;br /&gt;&lt;br /&gt;I am using DXP 7.1. Any idea on how i can have a field that will populate logged in user&amp;#39;s details; like username?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;​​​​​​​Gopal</summary>
    <dc:creator>Gopal Satapathy</dc:creator>
    <dc:date>2019-04-16T08:30:50Z</dc:date>
  </entry>
</feed>
