Code Monkey home page Code Monkey logo

bp-xprofile-custom-field-types's People

Contributors

raviousprime avatar sbrajesh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

bp-xprofile-custom-field-types's Issues

xprofile_get_field_data is getting empty string from "date" field when used in "profile_update" hook

 add_action('profile_update',function($user_id,$oldData,$newData){
   require_once('updateUsersToSheet.php');
   updateUsersToSheet($api_url,$user_id);
 },10,3);

I am using the above code to send user data to a google sheet when the profile is updated. I have a "date" field which allows user to choose their birthday, and its field_id is 33.
In updateUsersToSheet.php,if I do
var_dump(xprofile_get_field_data(33,$user_id));

It will output an empty string. However, if I put
var_dump(xprofile_get_field_data(33,$user_id)); in function.php, it will correctly output the users' birthday.

I also tried to get this data from custom api

// get User bDay
add_action( 'rest_api_init', 'returnUserBday' );
function returnUserBday(){
  register_rest_route( 'wsk/v1', '/userBday/', array(
      'methods' => 'GET',
      'callback' => 'getUserBday',
  ) );
}
function getUserBday( $request ) {
  $id = $request->get_param('id');
  $bday = xprofile_get_field_data(33,$id);

  $response = array(
      'bday' => $bday
  );
  return rest_ensure_response( $response );
}

It also outputs an empty string.

I have tried create another "html5 date picker" field, and it doesn't have this problem.

Import or Export for bulk field additions

Hello,

I have several use cases to add groups of fields at once. We also have several conditional scenarios where will will be adding several hundred conditional fields based upon existing user selections. Are there any methods to import BP fields? I'm thinking some kind of csv or xml import? This will save us many hours of manual input. Curious for feedback. Thank you!

Checkbox Acceptance type does not update state on dashboard profile edit page

The Checkbox Acceptance type sticks on value 1 when unchecked on the dashboard profile edit page. This causes the field to always save as if it were checked, even if it previously wasn't.

The cause appears to be line 6 in assets/js/bp-xprofile-custom-field-types.js. It uses .editfield as a parent selector, but that class does not exist on the parent on the dashboard profile edit page.

Possible fix: replace the selector with .field_type_checkbox_acceptance, which appears to be on both front and backend.

File field doesn't save

Hello,

I would like to submit a bug in the plugin called "BuddyPress Xprofile Custom Field Types" v1.1.1

Problem: The file field does not save the files.

  • When editing in frontend profile editor, it will reload the page with all other fields updated and the file field is empty even though before saving, there was a file uploaded.
  • Editing users in the backend "wp-admin/users.php" page. Under the extended tab. Uploading a file and saving it redirects to a 404 page. This only happens when there is a file field in the form.

Steps to reproduce:

  • Add a new BuddyPress profile field of type "File"
  • Navigate to a page to edit your profile information. You should see the new file field.
  • Upload any file and hit save

I hope you can fix this issue get a fixed version available for download. For more information, please email me at [email protected]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.