Reply To: Multiple details fields for a task

#19280
Carl L
Participant

Update for ver 2.3.0

The intention of this edit is to provide the volunteer with a larger textbox for the details
and also prefill with a numeral 1. and numeral 2. on separate lines. This change permits
the prompt (in the second edit below) to ask the volunteer to enter one detail on line 1. and
another detail on line 2.
Modify form **pta-volunteer-sign-up-sheets/classes/class-pta_sus_public.php**
in the function display_signup_form
near bottom, search for If details are needed
lokk in the conditional
if ($task->need_details == “YES”) {
on the input field
change:

ver 2.3.0
<input type=”text” id=”signup_item” name=”signup_item” value=”‘.((isset($posted[‘signup_item’])) ? stripslashes(esc_attr($posted[‘signup_item’])) : ”).'” ‘.esc_attr($details_required).’ />

to (the new line after 1. is important):
ver 2.3.0 <textarea id=”signup_item” name=”signup_item” rows=”2″ cols=”50″ ‘.esc_attr($details_required).’>’.((isset($posted[‘signup_item’])) ? stripslashes(esc_attr($posted[‘signup_item’])) : ‘1.
2.’).esc_attr($details_required).'</textarea>

The intention of this edit is to provide a larger box for the form manager to compose the
prompt for the box where details are to be entered during signup.
Modify form pta-volunteer-sign-up-sheets/classes/class-pta_sus_admin.php
in the function display_tasks_form
search for: Details text:
(about 80% through file)
On the next line, replace:
ver 2.1.0 – 2.3.0
echo ‘<span class=”pta_toggle”><br />’.__(‘Details text:’,’pta_volunteer_sus’).’ <input type=”text” class=”details_text” name=”task_details_text[‘.$i.’]” id=”task_details_text[‘.$i.’]” value=”‘.((isset($f[‘task_details_text’][$i]) ? esc_attr($f[‘task_details_text’][$i]) : __(“Item you are bringing”, “pta_volunteer_sus” ) )).'” size=”25″></span>’;

with:
echo ‘<span class=”pta_toggle”><br />’.__(‘Details text:’,’pta_volunteer_sus’).’ <textarea class=”details_text” name=”task_details_text[‘.$i.’]” id=”task_details_text[‘.$i.’]” rows=”2″ cols=”50″>’.((isset($f[‘task_details_text’][$i]) ? esc_attr($f[‘task_details_text’][$i]) : __(“Item you are bringing”, “pta_volunteer_sus” ) )).'</textarea></span>’;