Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End [WORDPRESS] Remove div IF textarea is empty for Events Post Type Function Re: [WORDPRESS] Remove div IF textarea is empty for Events Post Type Function

#138788
__
Participant

alright… what I’m looking for is something that might add the value “Extra Details” as a default value for your `event_info` column. I’m not seeing anything – that phrase doesn’t appear anywhere in the code you posted. Any ideas?

>Adrian, what if it was outputting whitespace even if she didn’t add anything to the textarea? That would also make it run true.

Yes, it would. But WP says it should return “an **empty** string” in that instance… unless whitespace (or something else, like a javascript “placeholder” value, for example) is actually being added to the form field somehow.


@Keilowe
, when you ran my code the first time, did you expect `$event_info` to be empty?

Also,
>It says “33”? Is “Extra Details ” the entire text it returns?