Conditional field according to URL

Hi !
I tried using window.parent.location.pathname.includes(“contacts”); for disabling a field for a specific URL as i am using Content editor extension i want a field to be disable in extension is there any way possible to achieve this?

Good question. I have never tried it. But the expression is a just a javascript function. I guess it should work like this. But it should not be window.parent, because the expression is not evaluated inside the iframe.

if we don’t use window.parent how can we differentiate that the new form is in iframe or normal schema page

I am not sure what exactly you do…you integrate Squidex in an iframe into something?

I called suidex in iframe for Content Editor Extension and in extension i need a field to be disabled but should work normal when we access the form directly

I will test it today or tomorrow. Can you give my your full condition?

Thank you for your time but yesterday i was trying and resolved it using window.self!= and it worked.

1 Like