Modifier: :id
Category ID instead of the name. Write it after a colon: {Category:7:id}
About
Post Category fields only. On checkbox, radio and select this is compared against the whole modifier string, so it must stand alone; on multiselect it is a normal in_array test.
| Product | Gravity Forms |
|---|---|
| Requires | Gravity Forms 1.9 or later |
| Works on | Post category fields |
| In the picker | What to show |
How to use it
Link to the chosen category
The category ID, for building a link the name cannot.
Write
https://example.com/?cat={Category:7:id}Get
https://example.com/?cat=2Examples
Rendered by real Gravity Forms and GravityKit PHP against a test entry.
| Merge tag | Output | Without the modifier |
|---|---|---|
{Category:7:id} | 2 | Baked Goods |
Where the merge tag picker offers it
Form fields: Post category.