How to access the password field in frm_api_request_args

By: Fred Wells | Asked: 04/12/2024
ForumsCategory: General questionsHow to access the password field in frm_api_request_args
Fred Wells asked 1 month ago

Hi,  I am trying to use the frm_api_request_args filter and I have to prepare the payload for it. Which means changing the body for the request. The problem is the password field is removed. I tried adding this:

add_action( 'rest_api_init', 'init_include_password_in_api' );
function init_include_password_in_api() {
add_filter( 'frm_include_field_in_content', 'bs_include_password_in_api', 10, 2 );

function bs_include_password_in_api( $include, $field_value ) {
if ( 'blueshoon_pw' === $field_value->get_field_key() ) {
$include = true;
return $include;

But this doesn't provide access in the frm_api_request_args hook. Is there way to accomplish this?

3 Answers
Best Answer
Fred Wells answered 1 month ago
I've figured out an alternative method. I can copy the password field to a hidden one with the `frm_validate_field_entry` and use it from there.
Victor Font answered 1 month ago

Where are you using frm_api_request_args in your code? Please use pastebin or gist to post all of your code. What you posted above makes no sense in the context of frm_api_request_args.

Fred Wells answered 1 month ago

Here is the code I'm trying to implment line 16 is the part that is coming up blank.

Victor Font replied 1 month ago

Can you show the contents of $arg_array, $args, and $body?

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community