Quantcast
Channel: Tutorials Archives | Gravity Wiz
Viewing all articles
Browse latest Browse all 122

Did the id attribute of my Gravity Forms radio and checkbox inputs change?

$
0
0

If you’re upgrading from a version earlier than Gravity Forms 1.8.20.7, yes, it did. The id attribute for radio and checkbox choice inputs now includes the form id.

New Id

View this code snippet on GitHub.

Note the “id” attribute: choice_294_2_1

Old Id

View this code snippet on GitHub.

Note the “id” attribute: choice_2_1

This might be causing you grief if you had custom javascript code that was expecting the ids to be in the old format. With the recent release of Gravity Forms 1.9, I’ve had more and more people coming to me with issues related to this change. Hopefully this PSA might spare some other folks a small headache.

What are the numbers in the input ID anyhow?

The numbers follow this template:

choice_{formId}_{fieldId}_{inputId}


Viewing all articles
Browse latest Browse all 122

Trending Articles