30 days free. No credit card. Full access from the moment you connect your site.

Start free trial

GeoDirectory Manage Listing Field

geodirectory/manage-listing-field edits the add-listing form for a listing type: create adds a field, update edits one by ID, reorder sets the form order.

Creating or changing a field alters the listing type’s database table. This is a schema change.

At a glance

Abilitygeodirectory/manage-listing-field
ToolsetGeoDirectory — toolset/geodirectory
GroupGeoDirectory › Fields
RequiresAcrossAI Pro, plus GeoDirectory active on the site
Capabilitymanage_options
SafetyWrites data
RepeatableNot idempotent — each call changes the row set, so re-running is not a no-op
Ships inAcrossAI Pro 0.9.16 and later

Schema, not settings

GeoDirectory stores listing field values in a real table with a column per field. Adding a field adds a column; changing its type changes the column type.

That has two consequences worth holding on to. The first is that htmlvar_name is the column name — renaming it on an existing field is a schema rename that orphans every existing value.

The second is that a type change can lose precision or truncate. Changing a text field to a number is a column conversion, and what does not convert is discarded by the database, not by GeoDirectory.

To take a field out of use without any of that, set is_active false. The column and its data stay; the field simply stops appearing.

The reorder action takes the complete ordered list, because array position becomes the sort order. Sending a partial list renumbers only what you sent and leaves the rest at their old positions, which produces collisions.

Not idempotent for create.

Input

NameTypeRequiredWhat it is
actionstringYescreate, update or reorder.
post_typestringNoListing type, for example gd_place. Defaults to the site default. See geodirectory/get-directory-overview for the valid values.
idintegerFor updateCustom field ID.
field_typestringFor createInput type. Determines the database column type.
htmlvar_namestringFor createThe field key, and the database column name. Renaming it orphans existing data.
admin_titlestringNoLabel in the admin field list.
frontend_titlestringNoLabel shown to visitors.
frontend_descstringNoHelp text under the field.
placeholder_valuestringNoInput placeholder.
default_valuestringNoValue pre-filled on the form.
option_valuesstringNoChoices for select, multiselect, radio and checkbox fields.
is_requiredbooleanNoWhether a submission is rejected without it.
required_msgstringNoValidation message when required and empty.
is_activebooleanNoFalse hides the field without dropping the column or its data.
show_inarrayNoWhere the value displays: detail, listing, mapbubble.
for_admin_usebooleanNoRestrict to administrators. Non-admin writes are silently dropped.
css_classstringNoExtra CSS classes on the wrapper.
field_iconstringNoIcon class shown beside the value.
sort_orderintegerNoPosition on the form.
tab_parentintegerNoFieldset ID to nest under, or 0.
cat_sortbooleanNoOffer the field as an archive sort option.
cat_filterbooleanNoOffer the field as a search filter.
validation_patternstringNoHTML5 pattern attribute.
validation_msgstringNoMessage when the pattern fails.
orderarrayFor reorderThe complete ordered list of field IDs.

What comes back

NameTypeWhat it is
fieldobjectThe field after the write.
successbooleanWhether the call completed.
messagestringA one-line summary of what happened, suitable for showing a human.
error_codestringPresent only on failure — a stable machine-readable reason, such as a missing field, a wrong field type or an unmet confirmation.

Example

Ask your assistant:

Add a phone field to the restaurant listing type.

It resolves to one call:

{
  "ability": "geodirectory/manage-listing-field",
  "parameters": {
    "action": "create",
    "field_type": "phone",
    "htmlvar_name": "phone",
    "frontend_title": "Phone",
    "is_required": false
  }
}

Worth knowing

  • This changes the database table. Take a backup before a type change.
  • Renaming htmlvar_name orphans existing values.
  • is_active: false retires a field without losing data.
  • Reordering needs the complete list.

Related abilities


Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager

Browse the rest: Every ability, by category


Keep reading