/** * initializes the record edit object */ public function __construct($shortcode_atts) { // define shortcode-specific attributes to use $add_atts = array('module' => 'record', 'class' => 'edit-participant ' . $this->wrap_class, 'submit_button' => Participants_Db::plugin_setting('save_changes_button')); // run the parent class initialization to set up the parent methods parent::__construct($shortcode_atts, $add_atts); $this->_setup_multipage(); // set the action URI for the form $this->_set_submission_page(); if (false === $this->shortcode_atts['record_id']) { $this->_not_found(); } else { $this->participant_id = $this->shortcode_atts['record_id']; $this->participant_values = Participants_Db::get_participant($this->participant_id); if ($this->participant_values === false) { $this->_not_found(); } else { // update the access timestamp Participants_Db::set_record_access($this->participant_id); $this->_get_validation_errors(); $this->_setup_iteration(); $this->_print_from_template(); } } }