Questions & Answers

If you would like to ask a question about the framework, click the here to do so Ask a Question

How do I display a popup message?

You can use the c() function to display an alert message or a popup window as shown below:

    protected _load() {
        // display an alert popup box

        // displays a popup window
        $url = 'another-page.html';

How do I set or retrieve the values of all form elements within a page?

To retrieve all the element values within a form use the RaxanElement->inputValue() as shown below:

    protected function saveForm() {
        // returns the value of #form1 input elements as an associative array
        $values = $this->form1->inputValues();

To set the values of the elements within the form in a single call you can pass an array of value to inputValues() method:

    protected function loadForm() {
        $data = array(
            'name' => 'John Brown',
            'email' => '',
            'subject' => 'Web site development',

        // sets the value of #form1 input elements
        $values = $this->form1->inputValues($data);