library/src/blockclass/subclasses/BP_WebFormSubmitter.cc
// updates an input override field by name (frees content (not name) and replaces it with specified
// data (which is allocated)
updates an input override field by name (frees content (not name) and replaces it with specified
data (which is allocated)
updates an input override field by name ( frees content ( not name ) and replaces it with specified data ( which is allocated )
BP_ERROR_T BP_WebFormSubmitter::updateInputOverrideByNmae(char * input_name, char *new_content)
{
	if(!input_name || !new_content)
	{
		this->AddErr("Cannot update input override value with empty input/content.  For empty, pass a empty string not a null pointer.");
		return ERR_FAILURE;
	}
	P_FORM_SUBMIT_OVERRIDE_INPUT_FIELDS override = this->getInputOverrideByName(input_name);
	if(!override)
		return ERR_FAILURE;
	if(override->input_override_val)
	{
		bpfree(override->input_override_val);
		override->input_override_val = bpstrdup(new_content);
	}
	return ERR_SUCCESS;
}
BP_ERROR_T BP_WebFormSubmitter :: updateInputOverrideByNmae ( char * input_name , char * new_content ) { if ( ! input_name || ! new_content ) { this -> AddErr ( " " ) ; return ERR_FAILURE ; } P_FORM_SUBMIT_OVERRIDE_INPUT_FIELDS override = this -> getInputOverrideByName ( input_name ) ; if ( ! override ) return ERR_FAILURE ; if ( override -> input_override_val ) { bpfree ( override -> input_override_val ) ; override -> input_override_val = bpstrdup ( new_content ) ; } return ERR_SUCCESS ; }
updates an input override field by name (frees content (not name) and replaces it with specified
data (which is allocated)
updates an input override field by name ( frees content ( not name ) and replaces it with specified data ( which is allocated )
// check for null pointers // attempt to retrieve the input override // if the input doesn't exist, return failure // attempt to override value // return indicating success