Is there a way to add a class to the actual input field rather than just the containing div? I'm trying to get the Repeater Area to work, but all new fields completely ignore the original containing class and the javascript I've written toward that. I want each field to be able to have its own class.
Hi itpates,
Did you try the "Extra attributes" in the Advanced area of the field settings:
Best regards
Did you try the "Extra attributes" in the Advanced area of the field settings:
class:my_field_classYou may need to use {var:area_name.key}
Best regards
Excellent. I can see the class applied to the additional fields via the Inspector. Now...how do I get javascript to actually recognize the added fields? I am using the following to test:
$(".allownumericwithdecimal").on("keyup", function(){The original field works perfectly. Additional fields, however, totally ignore that, even though I can see class=allownumericwithdecimal in the input field. This {var:area+name.key} - does that have something to do with this functionality? If so where do I use it, and what do I replace "area_name" with?
alert( "You typed something!!!" );
});
Hi itpates,
You will need to edit your code:
You will need to edit your code:
$("body").on("keyup", ".field_class", function(){Best regards
alert( "You typed something!!!" );
});
This topic is locked and no more replies can be posted.