Modified entrystate field at "Edit Mode"

Modified entrystate field at "Edit Mode"

by Iruma Tenji -
Number of replies: 0

Hi,

In Report "Edit" Mode, the entrystate field is display as the Select Option as show below:



But i want to modified it to the display format view as shown below, for "Edit Mode"


But I don't know how to modified the php code in renderer.php:

    public function display_edit(&$mform, $entry, array $options = null) {

        $field = $this->_field;
        $fieldid = $field->id;
        $entryid = $entry->id;
        $fieldname = "field_{$fieldid}_{$entryid}";

        $currentstate = !empty($entry->state) ? $entry->state : 0;
        if ($states = $field->get_user_transition_states($entry)) {
            $mform->addElement('select', $fieldname, null, $states);
            $mform->setDefault($fieldname, $currentstate);
        } else {
            $mform->addElement('html', $field->states[$currentstate]);
        }
    }


Average of ratings: -