Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › {get_values checked} pseudo code is not working at all
This topic contains 7 replies, has 2 voices, and was last updated by Ernest Marcinko 2 years, 8 months ago.
- AuthorPosts
- September 23, 2020 at 10:52 am #29501
{get_values checked} pseudo-code for the custom field is not working at all.
For radio, it shows nothing
For checkbox, it will select all the options
For selectbox, it will show the word {get_values checked} as option.September 23, 2020 at 12:43 pm #29502Hi,
Thank you for letting us know.
The {get_values checked} is only to be used with checkox layout either way, as drop downs and radio values cannot be checked at the same time. Nevertheless I will make sure to correct that.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
September 24, 2020 at 2:13 am #29513Hi
Thank you for your reply and clarification. So, I wonder is there a way to set the first dynamic value as checked which stated here:
https://documentation.ajaxsearchpro.com/frontend-search-settings/custom-field-selectors
Quote:“In case of using checkboxes, you can also define the state of the checkboxex, if you need the to be checked:
{get_values checked}
For other types (radio, drop-down etc..) the first value will be selected by default. “September 24, 2020 at 7:55 am #29514Hi,
Sure! It should be automatically checked if you use the get_values without the checked attribute:
Best,{get_values}
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
September 24, 2020 at 8:04 am #29516Hi.
But it is not the case. There is no default option checked when I used the {get_values} pseudo code. I attached a screenshot of my trial. As shown in the screenshot, I expect 2020 to be checked when page load and return matched posts under. But nothing checked and come out either.
Attachments:
You must be logged in to view attached files.September 24, 2020 at 9:47 am #29523You are right, that does not work correctly. As a temporary resolution, I have made a few fixes in the current test version. If you are comfortable with editing files on your server, then please follow the guide below to resolve this. If you need help, you can add temporary FTP access and I will make the change for you.
1. Make sure to have a full server backup just in case
2. Open up the wp-content/plugins/ajax-search-pro/includes/functions/functions.php file on your server
3. Replace it’s contents with this
4. Save the file and reload the search pageThe
Best,{get_values checked}
should now select the first value for drop downs and radios, as well as select all values for multiselect dropdowns. The{get_values}
should not select anything with radio buttons.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
September 24, 2020 at 10:27 am #29524Thank you. It works. Looking forward to the new official update.
September 24, 2020 at 11:48 am #29525You cannot access this content. Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
- AuthorPosts
You must be logged in to reply to this topic.