|
|
Hiding options in the Post Form Content Field
Started by: igorL-3
in: Toolset Professional Support
Quick solution available
Problem: I would like to hide the Fields and Views, Forms, and Access buttons above WYSIWYG editors in my Forms from all Users except Admins.
Solution: Add the following custom code snippet in your child theme's functions.php file:
// https://toolset.com/forums/topic/hiding-options-in-the-post-form-content-field/
// hide advanced form buttons from non-admins
function remove_toolset_buttons(){
global $current_user, $wp_roles;
$admin = 'administrator'; // roles that can see the buttons
// get non-administrator role slugs
if ( ! isset( $wp_roles ) )
$wp_roles = new WP_Roles();
$all_roles = $wp_roles->get_names();
$editable_roles = apply_filters('editable_roles', $all_roles);
$editable_role_names = array();
foreach($editable_roles as $role=>$details) {
$editable_role_names[]= $role;
}
// remove f&v, forms, conditional output buttons
if ( !in_array( $admin, $current_user->roles ) ) {
add_filter( 'toolset_editor_add_form_buttons', '__return_false' );
add_filter( 'toolset_cred_button_before_print', '__return_false' );
}
// remove the Access button
add_filter( 'toolset_editor_add_access_button', function() use ($editable_role_names){
return $editable_role_names;
});
}
add_action( 'init', 'remove_toolset_buttons' );
|
|
2 |
3 |
4 years, 7 months ago
igorL-3
|
|
|
View filter to filter on child taxonomy terms
Started by: Jim
in: Toolset Professional Support
|
|
2 |
20 |
4 years, 7 months ago
Jim
|
|
|
Toolset Blocks – uninstall?
Started by: tyeB
in: Toolset Professional Support
|
|
2 |
3 |
4 years, 7 months ago
tyeB
|
|
|
Custom user fields not available in Views
Started by: marcialB
in: Toolset Professional Support
|
|
2 |
7 |
4 years, 7 months ago
marcialB
|
|
|
Custom Post Type not showing up in Customizer (Kadence Theme)
Started by: dylanH
in: Toolset Professional Support
|
|
2 |
2 |
4 years, 7 months ago
Nigel
|
|
|
Different Tiers of Connections
Started by: haseebM
in: Toolset Professional Support
|
|
2 |
4 |
4 years, 7 months ago
Luo Yang
|
|
|
Display parent within a loop view of related posts
Started by: pieterV-2
in: Toolset Professional Support
|
|
2 |
5 |
4 years, 7 months ago
pieterV-2
|
|
|
Alternative to create custom Gutenberg block
Started by: Kelly
in: Toolset Professional Support
|
|
2 |
4 |
4 years, 7 months ago
Luo Yang
|
|
|
I can't use single field block
Started by: 直子 村上
in: Toolset Professional Support
|
|
2 |
2 |
4 years, 7 months ago
Luo Yang
|
|
|
Inline field values are not displayed on the front page.
Started by: 直子 村上
in: Toolset Professional Support
|
|
2 |
6 |
4 years, 7 months ago
Luo Yang
|
|
|
Maps clustering not working as expected
Started by: brentE
in: Toolset Professional Support
|
|
2 |
10 |
4 years, 7 months ago
Christian Cox
|
|
|
Widget page showing nothing
Started by: jasonG-7
in: Toolset Professional Support
|
|
2 |
3 |
4 years, 7 months ago
jasonG-7
|
|
|
Repeatable fields always be prompted as update error
Started by: kelvinL-2
in: Toolset Professional Support
|
|
2 |
4 |
4 years, 7 months ago
Christian Cox
|
|
|
Custom registration form user registrations
Started by: behnamN
in: Toolset Professional Support
Quick solution available
Problem:
The problem here is that the user's custom fields are not showing up on the user profile when submitted on the form.
Solution:
In this user's case they created the user fields directly on the form by using the forms Generic Fields option.
This occurs because there isn't any user interface to retrieve these generic fields to be viewed on the backend.
The correct way to create custom user meta is by going to Toolset -> Custom Fields and creating the custom user meta field group for the users.
|
|
2 |
3 |
4 years, 7 months ago
behnamN
|
|
|
Custom registration form
Started by: behnamN
in: Toolset Professional Support
|
|
2 |
3 |
4 years, 7 months ago
behnamN
|