Unfortunately, the username and password you have entered do not match!

Registration

Unfortunately, this username is already taken!

Unfortunately, this e-mail address is already used!

Please retype the verification code.

All fields are required

Adding Labels (text) to Ticket Forms - Here's How

Welcome, Guest
Username Password: Remember me

Adding Labels (text) to Ticket Forms - Here's How
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: Adding Labels (text) to Ticket Forms - Here's How

Adding Labels (text) to Ticket Forms - Here's How 2 years, 4 months ago #9312

I had a requirement to add text within a ticket submission form as can be done with RSFormsPro but is not currently supported in RSTickets. The following code changes show how this can be done. Note these are CORE component hacks so updates will be an issue. This was done with version 1.0.0.r13 for Joomla 1.5.x

Change the following files:
components/com_rstickets/functions.php
After:
				case 'calendartime':
$return .= '<input type="text" name="rstcf_'.$row2['CustomFieldId'].'" id="rstcf_'.$row2['CustomFieldId'].'" value="'.(isset($_POST['rstcf_'.$row2['CustomFieldId']]) ? strip_tags($_POST['rstcf_'.$row2['CustomFieldId']]) : (strip_tags($row2['CustomFieldValues']))).'" onclick="displayCalendar(this,\''.$T_SETTINGS['Date_Format_JS'].' hh:ii\',this,true)" />';
break;
 

Add the code:
				case 'label':
$return .= '<div>' . $row2['CustomFieldValues'] . '</div>';
break;
 


Next file: components/com_rstickets/js/script.js
Change the line:
	var y=x.insertCell(2);y.innerHTML='<select name="CustomFieldType[]"><option value="textbox">Text box</option><option value="textarea">Text area</option><option value="select">Select list</option><option value="multipleselect">Multiple select list</option><option value="checkbox">Checkbox group</option><option value="radio">Radio group</option><option value="calendar">Calendar</option><option value="calendartime">Calendar and time</option></select>';y.className = 'tdGrey';
 

To:
 
var y=x.insertCell(2);y.innerHTML='<select name="CustomFieldType[]"><option value="textbox">Text box</option><option value="textarea">Text area</option><option value="select">Select list</option><option value="multipleselect">Multiple select list</option><option value="checkbox">Checkbox group</option><option value="radio">Radio group</option><option value="calendar">Calendar</option><option value="calendartime">Calendar and time</option><option value="label">Label</select>';y.className = 'tdGrey';
 
 


Then file: administrator/components/com_rstickets/page/admin/add_department.php

After the line:
							<option value="calendartime" '.($custom_field['CustomFieldType'] == 'calendartime' ? 'selected="selected"' : '').'>'.LBL_CALENDAR_TIME.'</option>
 

Add the line:
 
<option value="label" '.($custom_field['CustomFieldType'] == 'label' ? 'selected="selected"' : '').'>'.LBL_LABEL.'</option>
 
 


You will then gain a new field type of "Label" Enter the message you want to appear in the VALUE field, this sadly cannot contain HTML coding (anyone want to improve this mod with that feature?)
You will need to add a caption which will show, but it could be just a space.

Hope you find this of use.
Hugh

Adding Labels (text) to Ticket Forms - Here's How 5 hours, 1 minute ago #0

Hello,
This is an automatically generated message.
We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you wish to receive our support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here: http://www.rsjoomla.com/support-policy.html.

Thank You!
PLEASE NOTE: This topic is NOT locked and you can add replies to it. Other users are free to reply as well. This message has been generated by a bot and has no effect on the topic whatsoever.
  • Page:
  • 1
Time to create page: 1.50 seconds
Feedback