Skip Navigation

[Resolved] Split: Creating a protected search form

This support ticket is created 4 years, 2 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 – 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 2 replies, has 2 voices.

Last updated by andrewF-6 4 years, 2 months ago.

Assisted by: Waqar.

Author
Posts
#1770141

I would like to conduct a search using a a search form against a Toolset custom type. The search form will have Last Name and ID Number. The user should be required to enter both fields to return the result. The result should be unique and take the user directly to a page that can only be accessed after entering the correct {Lastname : ID Number} combination. It should not be possible to access the resulting page via URL or via search crawler.

Do you have any suggestions as to how this can be achieved with Toolset?

1. Both fields must be completed correctly
2. Result sends the user to a landing page specific to them
3. Landing page should not be accessible via copying and pasting the URL
4. Landing page should not be accessible to crawlers

#1770209

Hi,

For a protected search form such as this, you can add a custom field "Lastname" and "ID Number" to your custom post type which should be used for the search results.

While creating a post in this post type, you'll need to make sure that the correct "Lastname" and "ID Number" is saved in these fields.

For the "ID Number" field value, you can either use the current post's ID ( as it will always be unique) or any number that is easier for the admin/user to remember.

After that, you can create post view, which is set to show results through AJAX on the same page and without exposing the URL parameters. The search form will have two fields, "Lastname" and "ID Number" and whenever the right combination would be used, the respective post result will appear, below the search form.

Using the Toolset's built-in search feature, this is the closest you can get. If you absolutely need the search result on a separate page, without exposing any URL parameters and a unique link that is not re-usable through copy/paste, you'll need a fully custom developed form, with PHP processing.

For more personalized assistance around customization, you can also consider hiring a professional from our list of recommended contractors:
https://toolset.com/contractors/

regards,
Waqar

#1770805

Thank you very much Waqar! The AJAX implementation is a brilliant solution. Thanks so much.