Jump to content

A Question to the showIf Option for Inputfields...


Orkun
 Share

Recommended Posts

Hi Guys

At first my created Inputfields

  • InputfieldSelect - label: "Email List", name: "list_id"
  • InputfieldSelect - label: "Field Parameter", name: "fieldParam"
  • InputfieldAsmSelect - label: "Interests Parameter", name: "interestParam"

I have a problem with the showIf Option for  my interestParam field. I have multiple "fieldParam" Selects because of the "list_id" Select. Everytime i select a Email List it displays me the right "fieldParam" Select because of the showIf option I defined in "fieldParam":

$field->showIf = "list_id=$list_id,  method_recipient=groupSegment";

Since the "list_id" Select exists only one time this works great. Now I'am trying to do this for the "interestParam" MultipleSelect. Everytime I select a group inside fieldParam it should show me the right "interestParam" Select. For this I am also adding a showIf Option:

$field->showIf = "method_recipient=groupSegment, fieldParam=$groupID";

This fails because the fieldParam exists multiple times. So what can I do about it?

Greetings

Nukro

Link to comment
Share on other sites

Nevermind...

Solved it by adding the $list_id to the fieldParam name attribute. After that I just have to do this:

$field->showIf = "method_recipient=groupSegment, fieldParam_$list_id=$groupID";
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...