You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Syphon provides an ability to create custom input readers and writers for different data types. But type is always detected as tag name or type attribute. But sometimes I have to deal with custom data stored in the simple <input type="text">, but I still need to apply custom reader and writer for that fields.
Is there a way how to apply input readers and writers in the more customizable way? For example, add extra data-format attribute with additional information about field format.
The text was updated successfully, but these errors were encountered:
Now I found a workaround with overriding default input reader and writer to add them more custom logic:
Backbone.Syphon.InputReaders.registerDefault(function($el){varformat=$el.data('format');varvalue=$el.val();if(format){//custom format logic}returnvalue;});Backbone.Syphon.InputWriters.registerDefault(function($el,value){varformat=$el.data('format');if(format){//custom format logic}$el.val(value);});
Syphon provides an ability to create custom input readers and writers for different data types. But type is always detected as tag name or
type
attribute. But sometimes I have to deal with custom data stored in the simple<input type="text">
, but I still need to apply custom reader and writer for that fields.Is there a way how to apply input readers and writers in the more customizable way? For example, add extra
data-format
attribute with additional information about field format.The text was updated successfully, but these errors were encountered: