<?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>AutoFields and onChange method</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=118362012" />
  <subtitle>AutoFields and onChange method</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=118362012</id>
  <updated>2026-04-03T22:14:44Z</updated>
  <dc:date>2026-04-03T22:14:44Z</dc:date>
  <entry>
    <title>RE: AutoFields and onChange method</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118382473" />
    <author>
      <name>Daniel G</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118382473</id>
    <updated>2020-01-30T16:14:32Z</updated>
    <published>2020-01-30T16:14:32Z</published>
    <summary type="html">Hi.&lt;br /&gt;&lt;br /&gt;Thanks for your help, Following your instructions, I&amp;#39;ve changed the method and it works. Thanks again!&lt;br /&gt;&lt;br /&gt;Regards</summary>
    <dc:creator>Daniel G</dc:creator>
    <dc:date>2020-01-30T16:14:32Z</dc:date>
  </entry>
  <entry>
    <title>RE: AutoFields and onChange method</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118367204" />
    <author>
      <name>Mohammed Yasin</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118367204</id>
    <updated>2020-01-29T06:14:02Z</updated>
    <published>2020-01-29T06:14:02Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;Hi,&lt;br&gt;You can try&amp;nbsp; triggering event on class rather the element or id as in autofield there will be multiple field getting clone ,&amp;nbsp; try using below code&lt;br&gt;&lt;pre&gt;&lt;code&gt;[code]$(document).on('click', '.selectclass', function(){});&lt;/code&gt;&lt;/pre&gt;&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Mohammed Yasin</dc:creator>
    <dc:date>2020-01-29T06:14:02Z</dc:date>
  </entry>
  <entry>
    <title>AutoFields and onChange method</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118362011" />
    <author>
      <name>Daniel G</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118362011</id>
    <updated>2020-01-28T16:25:30Z</updated>
    <published>2020-01-28T16:25:30Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;Hi.&lt;br&gt;I am developing a form on Liferay 7.1 which has aui:select. I want to use Liferay AutoFields, and the use the JQuery onchange method.&lt;br&gt;My problem is that the onChange method is only triggered by the select that I've created by code, but not by the aui:selects that are created with the Liferay Auto Fields. Liferay Auto Fields appears to work fine, as the new fields are created, and onChange methods looks fine as it works for the first select.&lt;br&gt;Anyone can give an idea about this? I am very lost.&lt;br&gt;&lt;br&gt;- Select method&lt;br&gt;&lt;pre&gt;&lt;code&gt;
&amp;lt;aui:select id="select1" name="select1"&amp;gt;
	&amp;lt;aui:option label="1" value="1"&amp;gt;&amp;lt;/aui:option&amp;gt;
	&amp;lt;aui:option label="2" value="2"&amp;gt;&amp;lt;/aui:option&amp;gt;
	&amp;lt;aui:option label="3" value="3"&amp;gt;&amp;lt;/aui:option&amp;gt;
&amp;lt;/aui:select&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;&lt;br&gt;- On Change method&lt;br&gt;&lt;pre&gt;&lt;code&gt;

&amp;lt;script&amp;gt;
$('select').on('change', function() {	
console.log(this);
});
&amp;lt;/script&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;&lt;br&gt;Any help would be very appreciated. Thanks in advance&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Daniel G</dc:creator>
    <dc:date>2020-01-28T16:25:30Z</dc:date>
  </entry>
</feed>
