|
Send user notification after WP All Import
Started by: martinH-16
in: Toolset Professional Support
|
|
2 |
4 |
7 years, 3 months ago
Christian Cox
|
|
I updated all my Toolset plugins yesterday – and everything fails, i'm lost:-/
Started by: Bo Jensen
in: Toolset Professional Support
|
|
2 |
4 |
7 years, 3 months ago
Noman
|
|
Display a default image when user feature image is empty
Started by: Jeffrey
in: Toolset Professional Support
Quick solution available
Problem: I would like to display an avatar image from a custom field, if that field has been set for the current post. If not, I would like to display a default image instead.
Solution: Use conditional statements that check the value of the avatar custom field. If the field is empty, show an image from your Media Library by using the Add Media button. If the field is not empty, show the custom field image using the Fields and Views button. Example:
[wpv-conditional if="( $(wpcf-avatar) ne '' )"]
[types field='avatar' alt='%%ALT%%' title='%%TITLE%%' size='full' align='none'][/types]
[/wpv-conditional]
[wpv-conditional if="( $(wpcf-avatar) eq '' )"]
<img src="http://yoursite.com/wp-content/uploads/2017/08/765-default-avatar-150x150.png" width="150" height="150" class="size-thumbnail" />
[/wpv-conditional]
Relevant Documentation: https://toolset.com/documentation/user-guides/conditional-html-output-in-views/
https://toolset.com/documentation/customizing-sites-using-php/functions/#image
|
|
2 |
3 |
7 years, 3 months ago
Jeffrey
|
|
How do I move a change from development to production. for example, a new form,
Started by: oliverD
in: Toolset Professional Support
|
|
2 |
2 |
7 years, 3 months ago
Noman
|
|
How do I make First Name and Last Name required?
Started by: OliverJ8211
in: Toolset Professional Support
|
|
2 |
7 |
7 years, 3 months ago
Shane
|
|
Radio buttons selection triggers assigning to one of 2 user roles
Started by: martinN-3
in: Toolset Professional Support
Quick solution available
Problem: I have a CRED form that creates new Users in a custom role with slug "kunde". I have defined two custom roles that I would like the User to be able to select from, and when the form is submitted I would like to change their role to the selected role.
Solution: Use a generic field to allow the user to select a role. The value for each option should be the slug of your custom role.
[cred_generic_field field='user_select_role' type='radio' class='zbrole' urlparam='']
{
"required":1,
"validate_format":0,
"default":[],
"options":[
{"value":"kunde_mit_zentralbelieferung","label":"Kunde mit Zentralbelieferung"},
{"value":"kunde_ohne_zentralbelieferung","label":"Kunde ohne Zentralbelieferung"}
]
}
[/cred_generic_field]
Use cred_save_data to modify the User's role after the User is created:
add_action('cred_save_data', 'cred_update_user_role_action',10,2);
function cred_update_user_role_action($user_id, $form_data) {
if ($form_data['id'] == 14)
{
// modify the user role to match the selected option
$role = $_REQUEST['user_select_role'];
$u = new WP_User( $user_id );
$u->remove_role( 'kunde' ); //cred form role setting
$u->set_role( $role );
}
}
Relevant Documentation:
https://toolset.com/documentation/user-guides/creating-cred-forms/
https://toolset.com/documentation/user-guides/cred-user-forms/
https://toolset.com/documentation/programmer-reference/cred-api/#cred_save_data
|
|
2 |
14 |
7 years, 3 months ago
Christian Cox
|
|
Automatic post creation on registration
Started by: martinN-3
in: Toolset Professional Support
Quick solution available
|
|
2 |
13 |
7 years, 3 months ago
martinN-3
|
|
Include user meta fields
Started by: tims-9
in: Toolset Professional Support
|
|
2 |
9 |
7 years, 3 months ago
Luo Yang
|
|
How to Change Error Message
Started by: Dharanendra Patil
in: Toolset Professional Support
|
|
2 |
2 |
7 years, 3 months ago
Beda
|
|
How to validate fields in form
Started by: Dharanendra Patil
in: Toolset Professional Support
|
|
2 |
2 |
7 years, 3 months ago
Beda
|
|
how add bootstrap for login dialog?
Started by: Mario
in: Toolset Professional Support
Quick solution available
Problem:
How to style (using bootstrap) this Login form created using CRED form:
[wpv-login-form]
Solution:
Use Custom HTML and CSS to style the Login form differently from the WordPress native Login form.
As an example a display: flex applied on the container div will put your input fields inline.
For reference, this should help:
https://codex.wordpress.org/Customizing_the_Login_Form
|
|
2 |
3 |
7 years, 3 months ago
Mario
|
|
Disable Bootstrap “form-control” styling
Started by: Charles
in: Toolset Professional Support
Quick solution available
Problem: I would like to disable the blue glow and rounded borders on form inputs that have the "form-control" CSS class.
Solution: Either disable Bootstrap entirely in Toolset > Settings > General, or add your own styles that will override Bootstrap. The following code will remove the rounded corners and blue glow on focus:
.wpv-filter-form .form-control {
border-radius: 0;
box-shadow: none;
-webkit-box-shadow: none;
}
Relevant Documentation: https://toolset.com/documentation/user-guides/using-bootstrap-css-elements-content/
|
|
2 |
5 |
7 years, 3 months ago
Charles
|
|
wpv_filter_override_auth_errors fires not just for errors
Started by: Mario
in: Toolset Professional Support
Quick solution available
Problem:
I am trying to use this example for filter as described here:
https://toolset.com/documentation/programmer-reference/views-filters/#wpv_filter_override_auth_errors
But wpv_filter_override_auth_errors is not working as expected on [wpv-login-form].
Solution:
There was a mistake in the given example code but it's fixed now. Please add this updated code in your theme’s or child theme’s functions.php file and it will resolve the issue:
add_filter( 'wpv_filter_override_auth_errors', 'custom_wpv_override_auth_errors', 30, 3 );
function custom_wpv_override_auth_errors( $message, $class = '', $code = '' ) {
if ( $code != '') {
$message = __( '<strong>ERROR</strong>: ', 'wpv-views' );
switch( $code ) {
case 'invalid_username':
$message .= __( 'Invalid username.', 'wpv-views' );
break;
case 'incorrect_password':
$message .= __( 'The password you entered is incorrect.', 'wpv-views' );
break;
case 'empty_password':
$message .= __( 'The password field is empty.', 'wpv-views' );
break;
case 'empty_username':
$message .= __( 'The username field is empty.', 'wpv-views' );
break;
default:
$message .= __( 'Unknown error.', 'wpv-views' );
break;
}
if( !empty( $class ) ) {
$message = '<div class="' . $class . '">' . $message . '</div>';
}
return $message;
}
}
Relevant Documentation:
https://toolset.com/documentation/programmer-reference/views-filters/#wpv_filter_override_auth_errors
|
|
2 |
3 |
7 years, 3 months ago
Mario
|
|
Auto login in a specific form and redirect to specific URL
Started by: nandomerino
in: Types Community Support
|
|
2 |
4 |
7 years, 3 months ago
Luo Yang
|
|
Remember Me option for login form
Started by: Charles
in: Toolset Professional Support
Quick solution available
|
|
2 |
5 |
7 years, 4 months ago
Charles
|