library/src/blockclass/subclasses/BP_WebFormSubmitter.cc
// try to retrieve a form override by name
try to retrieve a form override by name
try to retrieve a form override by name
P_FORM_SUBMIT_OVERRIDE_INPUT_FIELDS BP_WebFormSubmitter::getInputOverrideByName(char * input_name)
{
	if(!input_name)
	{
		this->AddErr("Looking up a null input name.  Input name should be a valid string.");
		return NULL;
	}
	if(strnlen(input_name, 1024) == 0)
	{
		this->AddErr("Input name has to actually be a non-zero length string.");
		return NULL;
	}
	size_t n = 0;
	for(; n < this->override_fields_n; n++)
	{
		if(strncmp(this->override_fields[n].input_name, input_name, strnlen(input_name, 2048) ) == 0)
		{
			return &this->override_fields[n];
		}
	}
	return NULL;
}
P_FORM_SUBMIT_OVERRIDE_INPUT_FIELDS BP_WebFormSubmitter :: getInputOverrideByName ( char * input_name ) { if ( ! input_name ) { this -> AddErr ( " " ) ; return NULL ; } if ( strnlen ( input_name , 1024 ) == 0 ) { this -> AddErr ( " " ) ; return NULL ; } size_t n = 0 ; for ( ; n < this -> override_fields_n ; n ++ ) { if ( strncmp ( this -> override_fields [ n ] . input_name , input_name , strnlen ( input_name , 2048 ) ) == 0 ) { return & this -> override_fields [ n ] ; } } return NULL ; }
try to retrieve a form override by name
try to retrieve a form override by name
// check input name // walk the fields and look for the value // if we cant find the form override, return null