Sandbox: https://drupal.org/sandbox/plethoradesign/2140095
git clone --branch 7.x-1.x http://git.drupal.org/sandbox/plethoradesign/2140095.git multi_text_fields
PAReview: http://pareview.sh/pareview/httpgitdrupalorgsandboxplethoradesign2140095git
If you have ever had a use case that called for a double or triple text field with those text fields grouped together, this module may be for you.
However, in many cases Field Collection would be a better choice due to its flexibility. With Field Collection you can redefine which text fields are associated, but with Multi Text Fields they are permanently glued together. So why this module? It provides a slightly easier setup for having multiple text fields in one field, and can make getting the data out easier in some cases. That also includes Views; this module comes with a Views integration. Keep in mind this module only allows for text fields. For specific use cases this module may be preferable to the alternatives.
Features
- 1-3 text fields (text fields ONLY!) grouped into a single field.
- Field formatters to display only text box 1 (Title), text box 2 (Details), or text box 3 (Additional)
- Views integration
Installation and Usage
- Install and enable module either from UI or with Drush
- Go to a content type and add a field; choose "Multi Text Field". If you do not see this, clear your cache at admin/config/development/performance since Drush might not have cleared all caches (for example APC, Memcache etc).
- It will ask whether you want two text fields or three.
- Customize the text labels and save your field
Similar Modules
- Field Collection
- Multifield
- Paired Fields - for Webform components .. their project page does not make this clear though.
Comments
Comment #1
caspervoogt commentedComment #2
caspervoogt commentedComment #3
caspervoogt commentedComment #4
caspervoogt commentedComment #5
caspervoogt commentedComment #6
neerajskydiver commentedUpdate your git clone link to
git clone --branch 7.x-1.x http://git.drupal.org/sandbox/plethoradesign/2140095.git multi_text_fieldsI tried to add new field with field type & widget as "multi text field"
Unfortunately i got following error after clicking "Save field settings"
Fatal error: Call to undefined function ckeditor_profiles_compile() in /var/www/drupals/sites/all/modules/multi_text_fields/mtf.module on line 464in your .module file on line 462 you mentioned
module_load_include('inc', 'ckeditor', 'includes/ckeditor.lib');this means ckeditor is dependency for this module ? then add dependency in .info file
And
instead of
'#title' => t($settings['title'])you can use like this
t('@st', array('@st' => $settings['title']))and also for
'#title' => t($settings['details']),'#title' => t($settings['additional']),Comment #7
Richard_Appnovation commentedHi,
Installed the module, did some functional testing and code review, so here are my findings:
@param [type] $parameter
[description]
@return
[description]
Otherwise, I don't see any other flaws or coding issues that prevents this module from being approved.
Comment #8
Richard_Appnovation commentedComment #9
caspervoogt commentedckeditor shouldn't be in there. Working on removing this and resolving the other items both of you mentioned- thanks for the feedback. Hang on while I resolve these.
Comment #10
caspervoogt commentedComment #11
caspervoogt commentedOK, I have resolved those. CKeditor is still in there, but I have wrapped it in an if(module_exists()). I did remove the two unused functions as well.
Comment #12
caspervoogt commentedComment #13
kscheirerI can see the use case - using field_collection is possible, but it would be a lot more work to set up to behave this way. No major issues found in the module, but there are a few style issues reported here: http://pareview.sh/pareview/httpgitdrupalorgsandboxplethoradesign2140095git.
----
Top Shelf Modules - Crafted, Curated, Contributed.
Comment #14
caspervoogt commentedComment #15
caspervoogt commentedAll PAReview issues have been sorted and it now comes back clean.
Comment #16
klausiRemoving review bonus tag, you have not listed any links to your review comments in the issue summary? See https://drupal.org/node/1975228
Comment #17
caspervoogt commentedAdded section for 'Reviews of other projects' and added PAReview bonus tag back.
Comment #18
klausifixed links
Comment #19
klausiThanks you for your reviews. When finishing your review comment also set the issue status either to "needs work" (you found some problems with the project) or "reviewed & tested by the community" (you found no major flaws).
manual review:
<script>alert('XSS');</script>as "details" or "additional" I get a nasty javascript popup. You need to sanitize all user provided text before printing, make sure to read https://drupal.org/node/28984 again. You even have text formats available as options, but you never apply them? And please don't remove the security tag, we keep that for statistics and to show examples of security problems.Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.
Comment #20
caspervoogt commentedThanks klausi! That was helpful. I resolved these and reran http://pareview.sh/pareview/httpgitdrupalorgsandboxplethoradesign2140095git and it is all clear.
The module could use some improved field formatters, down the road, but it will depend on the level of interest and feedback from users. At least now they're using filter_xss() properly.
Comment #21
caspervoogt commentedComment #22
klausiSorry for the delay. Make sure to review more project applications and get a new review bonus and this will get finished faster.
manual review:
But that are not critical application blockers, so I guess this is RTBC.
Assigning to dman as he might have time to take a final look at this.
Comment #23
klausino objections for more than a week, so ...
Thanks for your contribution, plethoradesign!
I updated your account so you can promote this to a full project and also create new projects as either a sandbox or a "full" project.
Here are some recommended readings to help with excellent maintainership:
You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and stay involved!
Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
Thanks to the dedicated reviewer(s) as well.