Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › {get_values checked} pseudo code is not working at all
- This topic has 7 replies, 2 voices, and was last updated 5 years, 8 months ago by
Ernest Marcinko.
-
AuthorPosts
-
September 23, 2020 at 10:52 am #29501
webcms_admin84
Participant{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 #29502Ernest Marcinko
KeymasterHi,
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.
September 24, 2020 at 2:13 am #29513webcms_admin84
ParticipantHi
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 #29514Ernest Marcinko
KeymasterHi,
Sure! It should be automatically checked if you use the get_values without the checked attribute:
{get_values}September 24, 2020 at 8:04 am #29516webcms_admin84
ParticipantHi.
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.
September 24, 2020 at 9:47 am #29523Ernest Marcinko
KeymasterYou 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
{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.September 24, 2020 at 10:27 am #29524webcms_admin84
ParticipantThank you. It works. Looking forward to the new official update.
September 24, 2020 at 11:48 am #29525Ernest Marcinko
KeymasterYou cannot access this content.
-
AuthorPosts
- You must be logged in to reply to this topic.