Jump to content
  • 0

Hide section when virtual field not equal to Host Page


datasador
 Share

Question

Hi,

I am trying to hide a section using a virtual field so when the host page does not equal to my domain name, then hide the section. This is what I have set up in my datapage:

1) a virtual field "[@Virtual1]" which has on load receive value or parameter as "System Parameters=Host Page.

2) I added a rule with a criteria like: [@Virtual1] is not 'https://www.datasador.net/comparables/' and with an action to hide a section.

But when I open my datapage inside my WordPress page it hides the section and when opening the page outside my domain it hides the section as well.

I only want it to hide the section if I open the datapage outside of my WordPress page.

Don't know if what I am trying to achieved is possible, so if anybody has another solution which could help .

Thanks!

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

Hi @datasador,

I tried replicating your workflow on my end, but it works as expected. When I access the DataPage outside WordPress, one section will be hidden. 

For testing purposes, please try to change the Form Element of  Virtual 1 from Hidden to Display Only. This will verify the Virtual 1's value when the page loads.

In the Rules, you can also use Does Not Contain, then your domain name.

 

Hope this helps!

Link to comment
Share on other sites

  • 0

Hh, cheonsa,

Thanks for the tip,  but unfortunately it stills does not work.  I have the Virtual 1 field to display only, and did put in "Does Not Contain", let me correct my self, it does work outside of my domain and outside of my WordPress site, but inside my domain and using it on my WordPress site its hides the section as well. Is like is not recognizing that I am using it in my domain.

So my problem is that is working outside of my domain but inside is hiding as well the section.

Don't know if I am missing something else, but here is my settings like:

 

image.thumb.png.76dbc44ff36bec36e7d5fed021673308.png

image.thumb.png.e7c85e155bb71ecc442b390174ecbb68.png

image.thumb.png.25fc84df69bf12c131d0ec45e4d6e007.png

 

Thanks!

Link to comment
Share on other sites

  • 0

Hi, cheonsa,

 

Thnks for the reply, I try your suggestion but I do not have the virtual field in the field section:

image.thumb.png.e97855d0305c01244e8c9c2b3a74cb06.png

Correct me but I did think that virtual fields does not show in the condition as field names. That's why I chose the parameter in condition. 

Or maybe there is another setting I am missing for that the virtual field can appear in the condition as a field.

thanks again.

Link to comment
Share on other sites

  • 0

Hi, PotatoMato and cheonsa,

Thanks both for all the help in this matter, I was able to achieved what I wanted. For those who need this this is what I did:

1) I put my Virtual field as a text field.

2) than when to the Rules and apply the rule. (now the Virtual field shows in the list of the fields)

3) when back and change the Virtual field as hidden.

4) That's it, now it worked!!!

So when I open my data page outside of my domain name my sections go to hide mode and disable. And when I am inside my WordPress site it shows the sections.

thanks for all the help!!!

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...