bhubbard/skills/gravity-forms-conditional-logic-object

Claude Code and agent skill by bhubbard/skills

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Understanding and dynamically applying conditional logic rules.

Install

npx vskill@latest install bhubbard/skills/gravity-forms-conditional-logic-object

SKILL.md

The same SKILL.md was published earlier as bhubbard/skills/gravity-forms-conditional-logic-object.

Gravity Forms Conditional Logic Object

Conditional logic controls the visibility of fields, buttons, notifications, and confirmations based on the choices selected or values entered by the user.

Reference

Conditional Logic Object Documentation

Structure

The Conditional Logic object is an associative array defining the rules. It usually resides as the conditionalLogic property of a Field Object, or inside a notification/confirmation array.

php
$conditionalLogic = array(
'actionType' => 'show', // show or hide
'logicType' => 'all', // all or any
'rules' => array(
array(
'fieldId' => '3', // The field ID to check
'operator' => 'is', // is, isnot, >, <, contains, starts_with, ends_with
'value' => 'Yes' // The value to match against
)
)
);

Common Usage

Dynamically Adding Conditional Logic

You can programmatically add or modify conditional logic to a field before the form is rendered.

php
add_filter( 'gform_pre_render_5', 'add_conditional_logic' );
function add_conditional_logic( $form ) {
foreach ( $form['fields'] as &$field ) {
if ( $field->id == 5 ) {
// Make Field 5 only show if Field 2 equals "Business"
$field->conditionalLogic = array(
'actionType' => 'show',
'logicType' => 'all',
'rules' => array(
array(
'fieldId' => '2',
'operator' => 'is',
'value' => 'Business'
)
)
);
}
}
return $form;
}

Best Practices

  • When defining rules for multi-input fields (like checkboxes or address fields), use the specific input ID as a string (e.g., 'fieldId' => '4.1') rather than just the base field ID.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
1
7-day trend score
8

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/bhubbard/skills/gravity-forms-conditional-logic-object/badge)](https://verified-skill.com/skills/bhubbard/skills/gravity-forms-conditional-logic-object)

Something wrong with this skill or its page? Tell us.