Closed (fixed)
Project:
Survey
Version:
5.x-1.x-dev
Component:
User interface
Priority:
Critical
Category:
Task
Assigned:
Reporter:
Created:
13 May 2007 at 13:23 UTC
Updated:
22 Mar 2008 at 06:36 UTC
Fields cannot be added to a survey because the 'add field' link is missing. Without these, it is not possible for non-technical savvy users to add fields.
Easy fix:
In the survey.module file change the survey_fields function to look as follows:
/**
* Show the fields for a survey
*/
function survey_fields() {
$nid = arg(1);
$node = node_load(array('nid' => $nid));
foreach ($node->form->fields as $field) {
$rows[] = array(array('data' => $field->title),
array('data' => $field->type),
array('data' => l(t('edit'), 'node/'.$nid.'/form/edit/'.$field->ffid)),
array('data' => l(t('delete'), 'node/'.$nid.'/form/delete/'.$field->ffid)));
}
if ($rows) {
$output = theme('table', array(t('field'), t('type'), ' ', ' '), $rows);
}
else {
$output = t('No fields defined');
}
$output .= '<br />' . l(t('add field'), 'node/'.$nid.'/form/edit'); // added only this line
return $output;
}
Comments
Comment #1
quicksketchSurvey module is no longer being maintained, use Webform module instead.
---Closing down issue queue of survey module---