custom HTML attributes missing when you open a custom form using the 'Event Capture' app

(Sorry I forgot the subject in my last email)

Dear dev community,

PSI usually develops custom forms (both on the aggregated and tracker side) with script code in order to implement extra functionality ot get the control of some input html fields. For example we can introduce extra attributes or events in the HTML tags as follows (where ‘custype’ attribute and the ‘onchange’ event have been introduced using the html code editor)

Now in Data Entry, If we open the form using the “old” ‘Single Event Without Registration Managment’ (under ‘Individual Records’), we can see the code above re-written as:

where all HTML attributes are there.

However if we use the new ‘Event Capture’ app, we get the following code:

where all attributes and events are missing.

Usually we get the control of HTML input fields using jQuery as follows: $(“input[custype=‘age’]”), so now using the Event Capture app we are not allowed to do that. Of course, we can use instead $(“input[name=‘VAGbWSzFIFg’]”), but this is more like a temporal solution (as it is not very readable and we cannot get the control of several DEs with the same attribute values).

Any ideas/solutions?

Thanks

Jose

Hi Jose,

We just made a fix, to trunk, that keeps html attributes intact. Your custom form should now work. Is it possible for you to test?

Thank you,

Abyot.

···

On Mon, Jun 16, 2014 at 2:43 PM, Jose Garcia Muñoz josemp10@gmail.com wrote:

(Sorry I forgot the subject in my last email)

Dear dev community,

PSI usually develops custom forms (both on the aggregated and tracker side) with script code in order to implement extra functionality ot get the control of some input html fields. For example we can introduce extra attributes or events in the HTML tags as follows (where ‘custype’ attribute and the ‘onchange’ event have been introduced using the html code editor)

Now in Data Entry, If we open the form using the “old” ‘Single Event Without Registration Managment’ (under ‘Individual Records’), we can see the code above re-written as:

where all HTML attributes are there.

However if we use the new ‘Event Capture’ app, we get the following code:

where all attributes and events are missing.

Usually we get the control of HTML input fields using jQuery as follows: $(“input[custype=‘age’]”), so now using the Event Capture app we are not allowed to do that. Of course, we can use instead $(“input[name=‘VAGbWSzFIFg’]”), but this is more like a temporal solution (as it is not very readable and we cannot get the control of several DEs with the same attribute values).

Any ideas/solutions?

Thanks

Jose


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Hi Abyot,

Many thanks for your help and I’m sorry for my late response…

I am testing with the revision 15183 (build date 2014-07-05), but still I am getting similar results. So if we define an input tag as:

where ‘custype’ is a custom attribute, ‘onchange’ is an event to be captured by test() function, and ‘size’ and ‘maxlength’ are html attributes. However in the HTML output we are missing all of them:

I don´t know much about AnjularJS, so maybe I am missing something.

Thanks

Jose

···

On Wed, Jun 25, 2014 at 1:11 PM, Abyot Gizaw abyota@gmail.com wrote:

Hi Jose,

We just made a fix, to trunk, that keeps html attributes intact. Your custom form should now work. Is it possible for you to test?

Thank you,

Abyot.

On Mon, Jun 16, 2014 at 2:43 PM, Jose Garcia Muñoz josemp10@gmail.com wrote:

(Sorry I forgot the subject in my last email)

Dear dev community,

PSI usually develops custom forms (both on the aggregated and tracker side) with script code in order to implement extra functionality ot get the control of some input html fields. For example we can introduce extra attributes or events in the HTML tags as follows (where ‘custype’ attribute and the ‘onchange’ event have been introduced using the html code editor)

Now in Data Entry, If we open the form using the “old” ‘Single Event Without Registration Managment’ (under ‘Individual Records’), we can see the code above re-written as:

where all HTML attributes are there.

However if we use the new ‘Event Capture’ app, we get the following code:

where all attributes and events are missing.

Usually we get the control of HTML input fields using jQuery as follows: $(“input[custype=‘age’]”), so now using the Event Capture app we are not allowed to do that. Of course, we can use instead $(“input[name=‘VAGbWSzFIFg’]”), but this is more like a temporal solution (as it is not very readable and we cannot get the control of several DEs with the same attribute values).

Any ideas/solutions?

Thanks

Jose


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Hi Jose,

Great that you made the test. But, as I mentioned, my fix was to trunk - revision 15844. Can you try on trunk? or you want it in 2.15?

Thank you,

Abyot.

···

On Sat, Jul 5, 2014 at 6:00 PM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Hi Abyot,

Many thanks for your help and I’m sorry for my late response…

I am testing with the revision 15183 (build date 2014-07-05), but still I am getting similar results. So if we define an input tag as:

where ‘custype’ is a custom attribute, ‘onchange’ is an event to be captured by test() function, and ‘size’ and ‘maxlength’ are html attributes. However in the HTML output we are missing all of them:

I don´t know much about AnjularJS, so maybe I am missing something.

Thanks

Jose

On Wed, Jun 25, 2014 at 1:11 PM, Abyot Gizaw abyota@gmail.com wrote:

Hi Jose,

We just made a fix, to trunk, that keeps html attributes intact. Your custom form should now work. Is it possible for you to test?

Thank you,

Abyot.

On Mon, Jun 16, 2014 at 2:43 PM, Jose Garcia Muñoz josemp10@gmail.com wrote:

(Sorry I forgot the subject in my last email)

Dear dev community,

PSI usually develops custom forms (both on the aggregated and tracker side) with script code in order to implement extra functionality ot get the control of some input html fields. For example we can introduce extra attributes or events in the HTML tags as follows (where ‘custype’ attribute and the ‘onchange’ event have been introduced using the html code editor)

Now in Data Entry, If we open the form using the “old” ‘Single Event Without Registration Managment’ (under ‘Individual Records’), we can see the code above re-written as:

where all HTML attributes are there.

However if we use the new ‘Event Capture’ app, we get the following code:

where all attributes and events are missing.

Usually we get the control of HTML input fields using jQuery as follows: $(“input[custype=‘age’]”), so now using the Event Capture app we are not allowed to do that. Of course, we can use instead $(“input[name=‘VAGbWSzFIFg’]”), but this is more like a temporal solution (as it is not very readable and we cannot get the control of several DEs with the same attribute values).

Any ideas/solutions?

Thanks

Jose


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp