German German English English

Settings of MPForm <<    ^ MPForm Help pages ^  

Frequently asked questions regarding MPForm

Question: LEPTON already comes with the Form module, so why should I install MPForm?
Answer: You should install the MPForm module only if you reached the functional limit of the Form module. MPForm offers much more potential, but consequently it requires more effort to learn how to adjust all the settings appropriately.
Question: My form contains a Date field. When I click the calendar icon next the field, no calendar does pop up?
Answer: The Javascript Calendar in some WB versions came with a known bug: If the Mainbody style uses absolute positioning and a Z-Index, the Calendar is positioned behind instead of in front of the main window. You just need to adapt the screen.css file of your template and everything will work.
Question: How can I integrate a declaration of consent (or my terms and conditions) into the form?
Answer: You can use a field of type HTML for arbitrary HTML code. When you put a single mandatory checkbox beneath this field, the user can only submit the form after he agreed to your conditions.
Question: Is it possible to preset a field dynamically, depending on some conditions?
Answer: Yes, you just need to set the right SESSION variable before the form is generated:
  1. Find out the ID of the field and the section_id of the form (look, for instance, into the field properties in the backend)
  2. Write your code in the file private.php into the function private_function_before_new_form. For the field with ID 42 in the form of section 24 you would write e.g.
    if ($section_id == 24) { $_SESSION['field42'] = "default value"; return true; }
It might make sense to set the status of the field to read only.
In case you have a multi select field, you write:
$_SESSION['field42']=array('one','two');
Question: I get a Fatal error: "Call to a member function numRows() on a non-object in \modules\mpform\evalform.php on line 533" - What does this mean?
Answer: You probably changed the suffix of the results table after you created the first field of the form. Starting with version 1.2 of mpform the problem should not occur anymore, but if you have changed the suffix of the results table in an earlier version of mpform when already fields were present, it should help to open the general settings page in the backend and simply save the settings again. This should trigger a scan of the fields and update the results table accordingly.