Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Use data attributes for binding functionality

Found in

EPiServer.Forms 4.2.1

Fixed in

EPiServer.Forms 4.5.0

(Or a related package)

Created

Dec 16, 2016

Updated

Apr 26, 2017

Area

JavaScript API

State

Closed, Acceptance tests pass


Description

We decided to use CSS classes instead of data-attributes because we wanted better performance for DOM querying. But performance differences are insignificant. So we should make these changes.

  • Use css classes for form styling only, not functionality.
  • Use data attributes for binding of buttons and functionality processing.

These changes will make extensibility easier, because partners don't know which classes are safe to remove and which ones to keep to not break the JavaScript.