This support ticket is created vor 8 Jahre, 2 Monate. 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.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
Im sorry to say that this didnt solve the problems.
Changing the parameter on the frontend (day) doesnt change the backend menu (night). See the images.
About the other problem I was referring to the IF statement not the general Views.
Do you notice any change in above code? I made a change actually.
The change is very minor and is around the first letter of words 'Day' and 'Night'. You were using 'day' and 'night' while the original field configurations are as 'Day' and 'Night'. Your JS function is also posting 'day' and 'night' while you were comparing for the same.
However, I didn't edit your JS, but edited the following function in your functions.php file:
function ajax_post(){
global $control_panel_post;
if ( isset( $_POST["time_var"] ) ) {
// (this will need to be sanitized)
$update_cf = ucfirst($_POST['time_var']);
// testing echo
echo $update_cf;
//update post meta with the value from jQuery
update_post_meta($control_panel_post, 'wpcf-select', $update_cf);
die();
}
}
add_action( 'wp_ajax_time', 'ajax_post' );
Please notice the function ucfirst(). I used this function to make first character of a string upper-case (hidden link), so it complies with the configuration of the select field.
Now I believe it works fine, as I have tested it for several times. Please check and confirm, thanks.
Yes its working perfectly now. Thank you for spotting this.
This task is now solved.
Shall I open a new one for the conditional IF or I add this last question here?
(how to visualise custom user fields into Views IF).
I suggest opening a new thread, so it can be reviewed and forwarded to the dev team. As fas as I can observe, the user fields may not be supported yet in that new visuals of this (since it's an ongoing work).