Skip to main content

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.

ProductGravity Forms
RequiresGravity Forms 1.9 or later
Works onPost category fields
In the pickerWhat 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=2

Examples

Rendered by real Gravity Forms and GravityKit PHP against a test entry.

Merge tagOutputWithout the modifier
{Category:7:id}2Baked Goods

Where the merge tag picker offers it

Form fields: Post category.