⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

[Solved] GC 1.4 beta dependent fields from dropdown selection



jrierab
  • profile picture
  • Member

Posted 29 April 2013 - 11:29 AM

First of all, let me say that GC 1.4 beta is so beautiful. The new pop-ups for Add/Edit and user messages are simply awesome. :D

 

However, I had some JS code to populate (read-only) fields from a dropdown selection, following some advice in this forum, which does not work anymore in GC 1.4.

 

Basically, in GC 1.3 I hook on: $('select[name=MyFiledName]').change(function(){...} but now in GC 1.4 beta all the input is performed in an overlay widget, which does not even exist when the page loads. So, my JS code has nothing to hook into.

 

Could anyone advise me about how to maintain this functionality in GC 1.4 beta? Or maybe there is a simpler/clever option.


jrierab
  • profile picture
  • Member

Posted 03 May 2013 - 07:32 AM

After some Firebug debugging and source code analysis, I've been able to have it working again. The trick is to attach (in JS) to DOM body the GC form id (#crudForm) with:

 

$("body").on("focusin", "#crudForm", FormActive);    
 

where FormActive is basically the JS function which was working before.