Active
Project:
Variable
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
31 Jul 2013 at 13:56 UTC
Updated:
31 Jul 2013 at 13:56 UTC
Jump to comment: Most recent
Would it be possible to support states in hook_variable_info()?
I have some variables that depend on each other in the settings form.
Would be nice to be able to use this.
Comments
Comment #1
jose reyero commentedVariables can define the form element, which may have a '#states' property. What else do we need?
Comment #2
BarisW commentedIt's been a few months since I've asked this question, so I don't know anymore what I needed this for. But I can image the following.
Suppose you have three variables:
I only need the last two variables to be filled in when the first one is set. So it would be nice here if I could set the visibility already using #states in the info hook. Or maybe even just a simple 'parent' key that is used for this use-case.