@missveronicatv Ok… so my concerns were valid. I’ve just been onto my other site and now there are different fields disabled from earlier today. I have to close them both down til issues are resolved.
@alychef
Yes you are right.
Dropdowns are also set to disabled by UM.
When I have added textarea fields they are editable after saving the UM Profile Form.
-
This reply was modified 2 years, 7 months ago by
missveronica.
@missveronicatv they’ll become disabled after a few hours or less. I’ve saved, resaved countless times. They’re editable after resaving the field and form and then the problem returns. The question is… what can we / I do?
@alychef
How is your UM setting for:
Appearance -> Profile -> “Enable HTML support for user description”
“How is your UM setting for:
Appearance -> Profile -> “Enable HTML support for user description”
Not checked on secaia but is checked on the other with same fields disabled issue. @missveronicatv
@alychef
You can try this code snippet,
which will make all fields editable and remove all disables.
add_filter( 'um_is_field_disabled', 'um_is_field_disabled_bug', 10, 2 );
function um_is_field_disabled_bug( $disabled, $data ) {
return '';
};
Install the code snippet into your active theme’s functions.php file
or use the “Code Snippets” plugin.
https://ww.wp.xz.cn/plugins/code-snippets/
@but some fields need to stay disabled? @missveronicatv
it would be better than nothing for now… on this site only… the other has fields for specific roles. I’m not all that confident about accessing files
@missveronicatv ok… for now that seems to have worked. I used the plugin. I’m celebrating with caution. You need to work for UM. More help than I’ve ever had. Could you try fields on my site? See if they’re editable?
-
This reply was modified 2 years, 7 months ago by
alychef.
@alychef
This code snippet will enable text and textarea fields only.
add_filter( 'um_is_field_disabled', 'um_is_field_disabled_bug', 10, 2 );
function um_is_field_disabled_bug( $disabled, $data ) {
if ( $data['type'] == 'textarea' || $data['type'] == 'text' ) {
return '';
}
return $disabled;
};
@alychef
Yes all fields at your site are enabled for editing now.
@missveronicatv TBH It’s only the name fields that shouldn’t be edited on this form. I’m not worried about those. And there’s drop downs and multi selects etc included. For now… this works. People can register and create their profile
@alychef
This code snippet will keep the fields disabled for first_name and last_name.
add_filter( 'um_is_field_disabled', 'um_is_field_disabled_bug', 10, 2 );
function um_is_field_disabled_bug( $disabled, $data ) {
if ( $data['metakey'] == 'first_name' || $data['metakey'] == 'last_name' ) {
return $disabled;
}
return '';
};
-
This reply was modified 2 years, 7 months ago by
missveronica.
-
This reply was modified 2 years, 7 months ago by
missveronica.
@missveronicatv you really are very kind and super helpful. Thank you
@alychef
You can replace the old code snippet with this one,
which is looking at the UM Forms builder settings for each field.
add_filter( 'um_is_field_disabled', 'um_is_field_disabled_bug', 10, 2 );
function um_is_field_disabled_bug( $disabled, $data ) {
$disabled = '';
if ( ! UM()->roles()->um_user_can( 'can_edit_everyone' ) && UM()->fields()->set_mode == 'profile' ) {
if ( isset( $data['editable'] ) && $data['editable'] != 1 ) {
$disabled = ' disabled="disabled" ';
}
}
return $disabled;
};
-
This reply was modified 2 years, 7 months ago by
missveronica.