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.
Hi,
I use Webform to send The Data also to Salesforce as Lead after submit and sending the E-Mails.
Salesforce requires to have special Field Keys for Form Fields, those have to be in the Format like:
00N21230002PGSh
But at the moment i can not enter uppercase characters inside the field key form field while editing a form field. I have to enter them over phpmyadmin direct into the db table...
Why is this restriction, i see no problem to enter upper case characters as field key.... I don't know exactly if this is a bug or a feature... :)
Best Regards,
Sandro
Comment | File | Size | Author |
---|---|---|---|
#5 | webform_field_key_uppercase.patch | 1.76 KB | quicksketch |
Comments
Comment #1
quicksketchA lot of "machine_keys" are lower case only, such as node types and field names. The design pattern in Drupal 7 for entering these things also assumes lowercase keys. However I think we could allow upper case characters if the user manually adjusted the key. In both D6 and D7 we prepopulate the key value with lowercase and underscores, so most people should be able to avoid accidentally using uppercase. A lot of users don't know that PHP is case sensitive and it leads to a lot of headaches when theming.
Comment #2
vernond CreditAttribution: vernond commentedWould it not be more expedient to add a bit of strtoupper code in your mail.tpl?
Oops: Just noticed that you have lowercase mixed in there as well...
Comment #3
feuillet CreditAttribution: feuillet commentedThat would be nice. Maybe it would be more fool-proof if ther would be a checkbox like "allow upper case characters" or something underneath the custom key-form to toggle off the lowercase validation...
Comment #4
rhlowe CreditAttribution: rhlowe commented+1 Subscribing
Comment #5
quicksketchI've committed this patch to the 3.x branches to allow uppercase characters in the component names. Fields are still converted to lowercase by default but it can be manually adjusted if necessary.