Skip Navigation

[Resolved] the fields in which "No Data" appears

This support ticket is created 6 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 12 replies, has 2 voices.

Last updated by edr-2 6 years, 11 months ago.

Assisted by: Shane.

Author
Posts
#607784
partial-attorney-detail-template.jpg

Tell us what you are trying to do? is there where fields have "No Data" is there a way to put blank space in the output?

Is there any documentation that you are following?

Is there a similar example that we can see? example at hidden link

What is the link to your site? hidden link

#607792

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Ed,

Thank you for contacting our support forum.

Do you mean that if the field is empty then you wouldn't want anything to appear in that spot?

If so then you can utilize our conditional shortcodes to achieve this by checking if the field is empty or not.

Take a look at the link below.
https://toolset.com/documentation/user-guides/conditional-html-output-in-views/checking-fields-and-other-elements-for-emptynon-empty-values/#checking-types-checkboxes-field-for-non-empty-value

Please let me know if this helps.

Thanks,
Shane

#607797
conditional-two.jpg

ok i am using the conditional gui, but the words "No Data" still appear - i am using this as a test for the field "Website" and checking to see if the test is working at hidden link
I tried both No Data in quotes and without quotes.
i am using two tests, the != with the blank, and the != with the words No Data.

one other problem, which i am having, is that Attorneys who make it to a list, fall off the list. I am thinking the way that is happening has something to do with them going into an archive state.
This is actually the primary problem. If the published date is changed to the current date, then the attorney shows up again, so that is why the word "Archive" comes to mind.
You might have to login to the site to see how the thing is set up. You might remember it more than i do!
ed

#607801

i think the problem with the field "Website" i fixed. Because copying the outer html and using that as the expression shows it was a link with a href etc.
i will work on the other fields over time. now the question is
about why an attorney would be on a list, then fall off...
ed

#607803

actually, on the "No Data" problem, i actually got things to work, but it removes the name of the field entirely, so now the word "Website" is gone. Maybe there is a way to code this so the name appears, and the word that i can choose , like the word "None". would that be going into the js customizer, or maybe there is another way?
thanks!
ed

#607960

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Ed,

I'm not sure how you got the word "No Data" to appear as when the fields have no information in them it should show up empty.

Ideally you would want this format correct "Website: None" ?

If so then you would need to employ 2 conditionals one to check if the field is not empty and then display the information and another to check if the field is empty and then hardcode the text in your content template.

Please let me know if this helps.
Thanks,
Shane

#607974

i coded it like this but it is not working.
what did i do wrong here?
[wpv-conditional if="( $(wpcf-website) eq 'No Data' )"]Website: None<br>[/wpv-conditional]
[wpv-conditional if="( $(wpcf-website) ne '' )"]Website: [types field="website" target="_blank" output="HTML"][/types]<br>[/wpv-conditional]

example output is at hidden link

#608076

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Ed,

This shortcode here.

[wpv-conditional if="( $(wpcf-website) eq '<a href="No Data" title="No Data" target="_blank">No Data</a>' )"]Website: None<br>[/wpv-conditional]

Should be

[wpv-conditional if="( empty($(wpcf-website)))"]Website: None<br>[/wpv-conditional]

Please let me know if this helps.
Thanks,
Shane

#608081
nodata.jpg

I don't get the same i guess as you are getting?
i have now 4 conditionals set up ( see pic).
I have a lot of fields that are getting the No Data entry, and also i do not know where it is coming from.
If it has No Data, or is Empty, i need a way to change the text output.
if it has something there, then i'd like it to just act normally.
I apparently will need something that acts like an else statement, but i don't see how to code it.
I have a copy of the site here at
hidden link
so that is where i am now coding.
on the left side see the output for the code appearing on the right side.
since i am busy trying to find a solution, things change.
let me know if you need a login and i will create one/
if i had left the Website field with 'No Data', i got the condition met.
Once i edited that attorney field with hidden link i saw the 'No Data' output again, below where it says fourth condition.
so i am totally bollixed and confused.
i read the documents, am copying and pasting your code, but still the solution evades me.

thanks!
ed

#608105

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Ed,

Would you mind providing me with admin access to the website so that I can have a look at this ?

The private fields will be enabled for your next response.

Thanks,
Shane

#608153

just a fyi - i know you likely will be taking a weekend. I am making progress, but for some reason i am getting line breaks when i use the conditionals.
so the output is having extra blank lines. One workaround is to remove the hardcoded <br> and combine lines but that is rather unwieldy, and will have trouble down the line. Does this make sense?
talk monday.
ed

#608259

i think i have resolved all my issues except one, and that is having to do with ordering of the attorneys when using the view
( see example at hidden link )

#608279

Thanks for your help, although i know i did the heavy lifting ( not too heavy though). You got me going in the right direction!
i solved the literal 'No Data' , as you had said, by using the conditional options eq and ne and both set to compare to the literal, and figured out how to put in content or blank or whatever. The issue of the new line i believe had to do with the options in an area below in the content template, for setting manual or auto paragraphs. But even so, I believe i had to concatenate the two conditonals together without a line break, in order for everything to work out. The ordering problem was resolved by my putting into the wp archive a new field, which i could use for ordering by string. Because i really did not want the field showing, i simply put it into a class where i could set the css to display:none.
The main issue was that the cpt were not showing up in the view, i solved by removing pagination ( set it to 'no'), which for some reason had to do with wp deciding whether or not to show these items. I also reset the general setting for showing posts from 10 to 100, alothough i am still not sure why this was happening, one thing or the other. I also used plugin to reset the date of publication, although i am not sure if that helped either. I have the development site still up, so if you wanted to explore and let me know the reason why the items did not show up, but now do, please feel free to do that. I will probably leave it up for a while.