Sandbox project available at Doublefield Formatter
This provides a more versatile "expert mode" formatter for the useful Double Field module, giving precise control over HTML tags and attributes. Double field is very good for presenting information as pairs of terms and definitions, e.g. technical specifications, where you do not know how many attributes you wish to describe. Using Display Suite Extras or Fences you can control the HTML around the field items, but have to rely on one the default formatters for the inner HTML or write custom theme function in your theme's template.php file. This module removes the need for a theme function in template.php or custom templates.
Inspiration
The Double Field module fulfils an essential requirement for many projects, enabling editors to enter miscellaneous content in pairs of terms and descriptions, e.g. for details, attributes or specifications. Although Double Field itself comes with a set of formatters, none gives the administrator full control over the rendered HTML, especially when seeking to comply with strict requirements for design, search engine optimisation, semantic markup and accessibility. The module only requires Double Field, but is ideally used with Display Suite and Display Suite Extras or Fences allowing full control over field templates. Also implemented are all options available in the default formatter for this field type.
How it differs from other modules
Double Field is a rather niche module, though well maintained for a discerning audience and I could not find another module that provide a custom formatter for it. In earlier projects, e.g. at http://www.london.ac.uk, I had implemented a theme hook to meet requirements. However, this can become unmaintainable as requirements and designs evolve. Administrators just want a simple tool to customise markup without asking a developer to edit a php file.
Standards
The module implements documented field hooks and where practical places detailed implementation in a separate file to minimise load when the formatter is not used.
| Comment | File | Size | Author |
|---|---|---|---|
| doublefield_formatter-7.1.tgz | 4.31 KB | Neil Gardner |
Comments
Comment #1
Neil Gardner commentedComment #2
PA robot commentedGit clone failed for http://git.drupal.org/sandbox/neilgardner/2391763.git while invoking http://pareview.sh/pareview/httpgitdrupalorgsandboxneilgardner2391763git
We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)
Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #3
joachim commentedIs there now code in the repo? Please set this back to 'Needs review' when there is so the bot notices and tries again. Also, note that the issue summary should give the git clone command for the convenience of human reviewers.
BTW, please don't add random keywords to the issue tags -- read the issue tag guidelines that are mentioned in the field help text.
Comment #4
joachim commentedManual Review
The starred items (*) are fairly big issues and warrant going back to Needs Work. Items marked with a plus sign (+) are important and should be addressed before a stable project release. The rest of the comments in the code walkthrough are recommendations.
If added, please don't remove the security tag, we keep that for statistics and to show examples of security problems.
This review uses the Project Application Review Template.
Comment #5
klausiWe use "PAReview: security" to indicate security issues in sandbox project applications.
Comment #6
PA robot commentedProject 1: https://www.drupal.org/node/2392699
Project 2: https://www.drupal.org/node/2392703
As successful completion of the project application process results in the applicant being granted the 'Create Full Projects' permission, there is no need to take multiple applications through the process. Once the first application has been successfully approved, then the applicant can promote other projects without review. Because of this, posting multiple applications is not necessary, and results in additional workload for reviewers ... which in turn results in longer wait times for everyone in the queue. With this in mind, your secondary applications have been marked as 'closed(duplicate)', with only one application left open (chosen at random).
If you prefer that we proceed through this review process with a different application than the one which was left open, then feel free to close the 'open' application as a duplicate, and re-open one of the project applications which had been closed.
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #7
chi commentedThis one already has manual review.
Comment #8
PA robot commentedClosing due to lack of activity. If you are still working on this application, you should fix all known problems and then set the status to "Needs review". (See also the project application workflow).
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #9
lazzyvn commentedHello
how can i use hook_field_widget_WIDGET_TYPE_form_alter for double field?
is there hook_field_widget_double_field_form_alter?
why type double_field_field_widget_info() return $widgets[$first_subwidget . '_&_' . $second_subwidget]
that means we can not use hook field_widget_textfield_&_textfield_form_alter(&$element, &$form_state, $context).
it isn't practical to change form
Comment #10
chi commented@lazzyvn, You cannot use hook_field_widget_WIDGET_TYPE_form_alter() with Double field. Use hook_field_widget_form_alter() instead.