Opened 9 years ago
Closed 9 years ago
#7035 closed enhancement (no action required)
No way to check empty value when using URL text field
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 2.5.0 |
Component: | Core | Keywords: | reporter-feedback |
Cc: | espellcaste@… |
Description
It seems that there is no way to check if a single URL text field, is empty only with text field.
Change History (6)
#2
@
9 years ago
- Keywords reporter-feedback added; 2nd-opinion removed
- Milestone changed from Awaiting Review to Under Consideration
How are you two testing this, please? Can you share your code?
#3
@
9 years ago
1st - Create an URL text field.
2nd - Go to your profile and add information in the newly-created URL text field.
3rd - var_dump the field, fetching with bp_profile_field_data( $user_id ).
It returns boolean false, even though there is a content to show.
#6
@
9 years ago
- Milestone Awaiting Review deleted
- Resolution set to invalid
- Status changed from new to closed
I am not sure about the original report as we don't have much information, but for @espellcaste's comment above, the call to bp_get_profile_field_data()
is wrong. You need to pass array( 'field' => 'field_id_or_name', 'user_id' => 117)
to the function, not just a user ID. It doesn't return ALL fields for the user, only the one specified.
@Dianakc We need more information. How exactly are you trying to get the data? Can you share the code? We can re-open this ticket and investigate if you provide more information. thanks.
Tested here and I can confirm the problem. Always returns boolean: false.