there should be some more textfields in the expert-field-template to make it look more important and expert-ish

for this reason there could be a pre and suffix field

I need this to put a zip code and a city name on one line divided by one space

Comments

Status:Active» Closed (duplicate)

Status:Closed (duplicate)» Closed (won't fix)

Going to wait with this one - field group is a better and easier option actually to get this working.

Status:Closed (won't fix)» Active

I recently have the problem that i want to have a suffix like <br /> and &nbsp; after a field and only if it is outputted. i think this cant be achieved using fieldgroups

Status:Active» Closed (won't fix)

This is not going to change in Drupal 7.

Version:7.x-2.x-dev» 7.x-2.4
Status:Closed (won't fix)» Needs review
StatusFileSize
new3.08 KB

I needed this so I wrote a patch (it's against 2.4, because that's what I have installed but it might apply against -dev)

It just provides two big textareas - one for prefix and one for suffix so that you can put whatever you like in there - either to add a single tag at the end or to wrap a field in whatever markup you choose.

StatusFileSize
new176.64 KB

+++ b/modules/ds_extras/includes/ds_extras.admin.inc
@@ -405,6 +405,19 @@ function ds_extras_field_template_settings_form(array &$form, array &$form_state
+    '#prefix' => '<div class="ft-wrappers">',
...
+    '#suffix' => '</div>',

I would put them in an extra key because this is kinda confusing.

+++ b/modules/ds_extras/includes/ds_extras.admin.inc
@@ -405,6 +405,19 @@ function ds_extras_field_template_settings_form(array &$form, array &$form_state
+    '#type' => 'textarea',
...
+    '#type' => 'textarea',

A textarea, really?

Here is screenshot of the patch from #5.
Screen Shot 2013-10-11 at 23.53.03.png

Status:Needs review» Closed (duplicate)

This is now officially a duplicat of #2076897: Prefix/suffix

yannickoo, my use of #prefix and #suffix for wrapping an element is commonplace, both in Drupal and in DS and although I wouldn't normally do this across elements as I have done here, I was duplicating a practice used elsewhere in the same function for consistency. For that reason I'd suggest a separate issue and patch to change all usages of the practice, as irritating as that may sound.

And yes, really a textarea. Maybe with less rows, but definitely a textarea. That form is far too compacted as it stands - the classes and attributes fields are far too squashed in already.