Skip Navigation

[Resolved] How to Have the field names of the search Results from this tool change

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.

Our next available supporter will start replying to tickets in about 1.97 hours from now. Thank you for your understanding.

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

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 4 replies, has 2 voices.

Last updated by BrandenT2154 1 year, 10 months ago.

Assisted by: Waqar.

Author
Posts
#2381587

Tell us what you are trying to do?
I built this search tool that allows users to search from a database of existing PO orders to get shipping and tracking info about their order: hidden link.

The customer gave us a spreadsheet that has various columns and one of the columns is "Container Number".

When A container number has been assigned, here is the format that the customer wants the search results to be in:

Customer Name: Return column H
Location: Return column I and J
PO: Return column F which is what they searched for
Container Number: Return column L
Estimated Date to Port: Return column K

If there is no container assigned yet (which would be indicated by the shipment container column being blank) then here is the format the customer wants the search results to be in:

Customer Name: Return column H
Location: Return column I and J
PO: Return column F which is what they searched for
Container Number: Not yet assigned
Estimated Delivery Month: Return column K

You will notice that the name of the field that is returned in the 2nd format is different than the field name in the first format.

Is there any documentation that you are following?

not yet.

Is there a similar example that we can see?

Not that I know of.

What is the link to your site?
hidden link

#2381965

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for contacting us and I'd be happy to assist.

To conditionally show some content or field(s), based on the value from another field, you can use the conditional block, as explained in this guide:
https://toolset.com/course-lesson/using-toolset-conditional-block/

In summary, you'll need two conditional blocks:

1. the first block will be set to show the content when the 'Container Number' is not empty.

2. the second block will be set to show the content when the 'Container Number' is empty.

I hope this helps and please let me know if you need any further assistance around this.

regards,
Waqar

#2383411

Hi Waqar,

Forgive me I'm a bit of a novice when it comes to this. So I only have one search bar on this page. I will need to have two conditional blocks that are both around this search bar block? Or both conditional blocks will be nested inside of each other around the view block?

I'm confused as to the structure of having two conditional blocks around one search results block. If they are both overlapping each other that wont cause any issues?

#2383607

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thanks for writing back.

In your view block, you'll see that the blocks which are showing the results/fields data are nested inside the "View Loop" block.

You'll add the conditional blocks, inside this "View Loop" block too, and then the relevant field blocks will be nested inside those conditional blocks so that their content is shown only when the condition is met.
( example screenshot: hidden link )

#2384151

My issue is resolved now. Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.