if (isset($_POST['fileParamsWeight_' . $fieldId]) && $_POST['fileParamsWeight_' . $fieldId]) { $params['weight'] = $_POST['fileParamsWeight_' . $fieldId]; } $field->setAttribute("params", $params); $options = array(); $optionsValues = explode('||', $_POST["selectValues_" . $fieldId]); $optionsLabels = explode('||', $_POST["selectLabels_" . $fieldId]); if (sizeof($optionsValues) && sizeof($optionsLabels)) { foreach ($optionsValues as $key => $value) { $options[$value] = $optionsLabels[$key]; } } $field->setAttribute("options", $options); $field->writeToPersistence(); //then replace field in XHTML source $xhtml = $form->replaceField($_POST['formCode'], $field); //then go to next step (send xhtml to wysiwyg) $step = 4; break; } break; } // +----------------------------------------------------------------------+ // | Rendering | // +----------------------------------------------------------------------+ switch ($step) { case 1: // used to send wysiwyg form content to server before analysis $content = ' <div id="divInfo" style="DISPLAY: none"> <form id="analyseForm" action="' . $_SERVER["SCRIPT_NAME"] . '" method="post">