Jump to content

How do I check if a field is blank or not, using a selector?


Recommended Posts

Posted

How do I check if a field is blank or not, using a selector?

I couldn't find any information on how to do this on the Selectors documentation, and on the forum.

I would like to use $pages->find()

Do I have a NULL variable and do something like 

$nullvar = NULL;
$companiesacceptedawaitingemail = $pages->find("template=company, approved=1, approval_email_sent_datenumber!=$nullvar");

 

Posted

Checking for empty value is usually enough

$emptyPages = $pages->find("myField=''") // note the empty string with single quotes
$filledPages = $pages->find("myField!=''")

 

  • Like 4

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...