Expand my Community achievements bar.

Applications for the Community Advisor Program Class of 2025 are NOW OPEN – Apply Today!

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

Avatar

Level 3

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>

Sujith_02kumar_0-1737577112683.png

 

Regards,

Sujith kumar

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

8 Replies

Avatar

Level 7

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

Avatar

Level 3

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

Avatar

Level 7

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

Avatar

Level 3

Tried the same. Still the issue persists.

 

Regards,

Sujith kumar

Avatar

Level 7

Have you tried to isolate parameter 1 and parameter 2, test the behavior verifying that parameter 1 exists under Customer Personalization schema inside Administration> Configuration> Data Schemas.

Additionally you can check xpath evaluation by doing the following and see how it behaves:

 

<input label="Parameter2" visibleIf="true()" xpath="../Other/CustomPersonalization/@Parameter2"/>

**If Parameter 2 turns to visible revise the condition

 

Other option:

Use a refresh to force the update.

 

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

Let's see how it behaves.

 

 

 

 

 

 

 

 

Avatar

Level 3

Tried everything. Still the issue persists. Only if I remove type="visibleGroup" I can see parameter2.

 

Regards,

Sujith kumar 

Try to encapsulate the inputs in containers 

 

Something like this

    <container colcount="2" type="visibleGroup" visibleIf="Length(@_internalName)=0">
                <container colspan="1">
                  <input colspan="2"
                  </input>
</container>
</container>

Avatar

Level 3

No luck