Jump to content

Getting a value from another page for an Inputfield Dependency condition.


Recommended Posts

Posted

I'm wondering if it's possible for an Inputfield Dependency to get a value from an inputfield on another page.

Example:

In the Admin I want an interior page to check if it's in a page selector field on the home page. If it's selected in the page selector on the home page, show a field.

I haven't seen anything that would allow this but I'm hoping it exists.

  • Like 1
Posted

Hey! Welcome to the forums, skylundi!

Almost everything is possible with hooks. But as it is your  first post there is a chance you do not need complicated solutions. Please explain your case a littlt deeper - maybe there is some simple way we can suggest.

And there is this nice module if you need just to show something on condition.

  • Like 2
Posted

a quick way to do this would be to use RuntimeMarkup field:

in that field code you would determine the outcome of the test (check to see if this page is in a page select from the other page) and the output a field with value 1 or 0;

for example if your field was called inPageSelect, then you'd get the runtime markup to output a hidden field with a value of 1 or 0, and then in your dependency you'd put show if "inPageSelect=1"

  • Like 2
Posted

a quick way to do this would be to use RuntimeMarkup field:

in that field code you would determine the outcome of the test (check to see if this page is in a page select from the other page) and the output a field with value 1 or 0;

for example if your field was called inPageSelect, then you'd get the runtime markup to output a hidden field with a value of 1 or 0, and then in your dependency you'd put show if "inPageSelect=1"

This is great.

I am looking to find where in the page list it exists. I think that's possible with this plugin if I'm reading the documentation correctly.

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...