Show the next fields as the user types in the previous field in the input form. (ACC) | Community
Skip to main content
Level 4
January 22, 2025
Question

Show the next fields as the user types in the previous field in the input form. (ACC)

  • January 22, 2025
  • 1 reply
  • 1081 views

Hi Everyone,

 

I’m learning about input forms. I have 6 parameters, and I want the second parameter to become visible as soon as the user starts typing in the previous parameter.

 

For example:
When I type something in Parameter 1, Parameter 2 should appear, and so on for the rest. This functionality works fine in navigation hierarchy when the Tab key pressed, but it is not working as expected in delivery.

Can someone help me resolve this issue?

 

Here is my input form code:

<container type="visibleGroup" visibleIf="EV([../@customSubChannelType], 'Other')">
                  <container label="Personalization value details" type="frame">
                    <static>Please fill Personalization details here.</static>
                    <container>
                      <input label="Has Personalization?" xpath="../Other/@hasPersonalization"/>
                    </container>
                    <container colcount="2" type="visibleGroup" visibleIf="EV([../Other/@hasPersonalization], 'Yes')">
                      <input label="Parameter1" xpath="../Other/CustomPersonalization/@Parameter1"/>
                      <input label="Parameter2" type="visibleGroup" visibleIf="EV([../Other/CustomPersonalization/@Parameter1], '') != ''" xpath="../Other/CustomPersonalization/@Parameter2"/>
                      <input label="Parameter3" type="visibleGroup" visibleIf="EV([../Other/CustomPersonalization/@Parameter2], '') != ''" xpath="../Other/CustomPersonalization/@Parameter3"/>
                      <input label="Parameter4" type="visibleGroup" visibleIf="EV([../Other/CustomPersonalization/@Parameter3], '') != ''" xpath="../Other/CustomPersonalization/@Parameter4"/>
                      <input label="Parameter5" type="visibleGroup" visibleIf="EV([../Other/CustomPersonalization/@Parameter4], '') != ''" xpath="../Other/CustomPersonalization/@Parameter5"/>
                      <input label="Parameter6" type="visibleGroup" visibleIf="EV([../Other/CustomPersonalization/@Parameter5], '') != ''" xpath="../Other/CustomPersonalization/@Parameter6"/>
                    </container>
                  </container>
                </container>

 

Regards,

Sujith kumar

1 reply

ccg1706
Community Advisor
Community Advisor
January 23, 2025

Hi @sujith_02kumar,

 

I think that the problem comes when relying on EV(), I would recommend you to try substituting it by applying visibleIf condition only to each imput.

Here I share an example of a possible imput solution:

<input label="Parameter2" visibleIf="[../Other/CustomPersonalization/@Parameter1] != ''" xpath="../Other/CustomPersonalization/@Parameter2"/>

 

 

On the other side, I will try to validate that all XPath Expressions point to the correct data schema element.

If you need more assistance, please let me know.

Regards,

Celia

Level 4
January 23, 2025

Thanks for responding. Still the issue persists. Parameter2 is not showing when i type something on parameter1. 

Here is the modified code as per your suggestion:

<container type="visibleGroup" visibleIf="../@customSubChannelType], 'Other')">
    <container label="Personalization value details" type="frame">
      <static>Please fill Personalization details here.</static>
      <container>
        <input label="Has Personalization?" xpath="../Other/@hasPersonalization"/>
      </container>
      <container colcount="2" type="visibleGroup" visibleIf="../Other/@hasPersonalization], 'Yes')">
        <input label="Parameter1" xpath="../Other/CustomPersonalization/@Parameter1"/>
        <input label="Parameter2" type="visibleGroup" visibleIf="[../Other/CustomPersonalization/@Parameter1] != ''" xpath="../Other/CustomPersonalization/@Parameter2"/>
        <input label="Parameter3" type="visibleGroup" visibleIf="[../Other/CustomPersonalization/@Parameter2] != ''" xpath="../Other/CustomPersonalization/@Parameter3"/>
        <input label="Parameter4" type="visibleGroup" visibleIf="[../Other/CustomPersonalization/@Parameter3] != ''" xpath="../Other/CustomPersonalization/@Parameter4"/>
        <input label="Parameter5" type="visibleGroup" visibleIf="[../Other/CustomPersonalization/@Parameter4] != ''" xpath="../Other/CustomPersonalization/@Parameter5"/>
        <input label="Parameter6" type="visibleGroup" visibleIf="[../Other/CustomPersonalization/@Parameter5] != ''" xpath="../Other/CustomPersonalization/@Parameter6"/>
      </container>
    </container>
  </container>
</container>


Regards,

Sujith kumar

ccg1706
Community Advisor
Community Advisor
January 23, 2025

Try with this one:

<container type="visibleGroup" visibleIf="EV([../@customSubChannelType], 'Other')">
<container label="Personalization value details" type="frame">
<static>Please fill Personalization details here.</static>
<container>
<input label="Has Personalization?" xpath="../Other/@hasPersonalization"/>
</container>
<container colcount="2" type="visibleGroup" visibleIf="EV([../Other/@hasPersonalization], 'Yes')">
<input label="Parameter1" xpath="../Other/CustomPersonalization/@Parameter1"/>
<input label="Parameter2" visibleIf="[../Other/CustomPersonalization/@Parameter1] != ''" xpath="../Other/CustomPersonalization/@Parameter2"/>
<input label="Parameter3" visibleIf="[../Other/CustomPersonalization/@Parameter2] != ''" xpath="../Other/CustomPersonalization/@Parameter3"/>
<input label="Parameter4" visibleIf="[../Other/CustomPersonalization/@Parameter3] != ''" xpath="../Other/CustomPersonalization/@Parameter4"/>
<input label="Parameter5" visibleIf="[../Other/CustomPersonalization/@Parameter4] != ''" xpath="../Other/CustomPersonalization/@Parameter5"/>
<input label="Parameter6" visibleIf="[../Other/CustomPersonalization/@Parameter5] != ''" xpath="../Other/CustomPersonalization/@Parameter6"/>
</container>
</container>
</container>

Regards, 

Celia