Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
On a site that uses editablefields it was requested that a clear button be added to "click to edit" forms. Since I only have one field using click to edit (a date field with pop up calendar), a quick and dirty tweak was to add:
$form['actions']['Reset'] = array('#markup' => '<input id="reset" type="reset" value="Clear" />', '#weight' => 1000);
to a new line, 379 following the form actions submit definition in editablefields.module.
This could likely be improved to include a user definable option on a per field basis. I can imagine an additional checkbox on the config options under manage display for a given field. I have limited time at the moment but could revisit this in the future.
Comments
Comment #1
Morasta CreditAttribution: Morasta commentedComment #2
Morasta CreditAttribution: Morasta commented