It seems that the "Attachment #1", "Attachment #2", etc. fields are being dynamically created by contact_attach, which prevents compact_forms and other modules from being able to modify the form. Another effect of this is that the "#1", "#2", etc. strings aren't translatable by locale.

Is there another way that contact_attach could offer any number of attachment fields and still support other modules?

Comments

oadaeh’s picture

Contact attach modifies the Contact module's forms with hook_form_alter(), it has no forms of it's own. I'm not sure how I'd modify the Contact attach module such that it does what it does in the way it does it while allowing the Compact Forms module to do it's thing.

Although I haven't tested it, other modules should be able to modify the form in the same way I did: hook_form_alter().

The numbers being translatable is a separate issue, which I believe I have addressed here: http://drupal.org/cvs?commit=102308

Tor Arne Thune’s picture

Version: 5.x-1.x-dev » 6.x-1.x-dev

In the D7 version only 'Attachment' is translated, so that shouldn't be a problem. I tried compact_forms with the D7 version on the site-wide contact form and it works the same with or without contact_attach enabled. The attachment field is of course not compacted, as there is no text field to display the title in, so for this to be compacted the title needs to be displayed above (or in front).

For the 6.x version I don't know. The 5.x version of contact_attach is no longer supported.

oadaeh’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

I'm closing this as it is for a branch that is no longer supported.