form submit change field value
-
Hello.
I’d like to do this:
Before the form is submitted, change the value of one field (eg.your-name field).I think I found the code that does it, in submission.php filepublic function get_posted_data( $name = '' ) { if ( ! empty( $name ) ) { if ( isset( $this->posted_data[$name] ) ) { $posted_data['your-name']="lalala"; //i want to change this return $this->posted_data[$name]; } else { return null; } } return $this->posted_data; //the values of all the fields }
How can I add the new value to the posted data, can anyone help me with this? My goal is to show the new value in the success message after the form is submitted.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘form submit change field value’ is closed to new replies.