Help Desk Software & Beyond
October 22, 2017, 08:23:17 AM *
Welcome, Guest. Please login or register.
To post messages you need to register. We apologize for inconvenience, but this is to prevent spam.
Registration is instant (no email verification) and we do not ask for any personal information.

Login with username, password and session length
News: Welcome to Help Desk Software forum!
 
   Home   Help Search Login Register  
Pages: [1] 2
  Print  
Author Topic: [MOD] Marking the red asterisk display on user defined mandatory fields  (Read 44371 times)
BigGreen
Newbie
*

Karma: 1
Posts: 25


View Profile
« on: April 25, 2008, 08:13:44 AM »

I have made some extra custom fields on the submission form mandatory using the follwing code:

<input type=hidden name=mandatory value="xDepartment/Faculty,xLocation,xRoom,xTelephone Extension">

The fields are validated to ensure they have been filled in correctly when the form is submiitted however the red asterisk ( * ) does not appear on the form to tell the user they are mandatory.

What should I do to make the red asterisk appear next to the field?

My other option is to removed the red asterisks from all fields and put a message on the form but I can't find where to remove teh asterisk from beside the "Team" field (whcih is used to select the "Group"). As a second question how can I remove the red asterisk from the group selector label on the input form?

Thank you in advance.
Logged
Sparky
Moderator
Hero Member
*****

Karma: 85
Posts: 2,275


stop pushing all those buttons


View Profile
« Reply #1 on: April 25, 2008, 08:52:44 AM »

It's most likely due to bad HTML...

Quote
<input type=hidden name=mandatory value="xDepartment/Faculty,xLocation,xRoom,xTelephone Extension">

The slash within your first hidden field breaks the HTML code.

xDepartment/Faculty

First suggestion would be to just replace the "/" with it's HTML entity equivalent....

Quote
xDepartment&#8260;Faculty

The code will be fixed and that field name will display as a "/" in the browser.

Let me know if that worked.
Logged

Did you update the paths in ttxcfg.cgi after moving TTX to your new location?   Undecided
To those seeking help.... please report back when you figure it out.  Cheesy
BigGreen
Newbie
*

Karma: 1
Posts: 25


View Profile
« Reply #2 on: April 25, 2008, 09:20:01 AM »

No. Unfortunately it didn't work. When the initial form is displayed there are still no red asterisks by the custom defined mandatory fields.
You can view a screen shot here: http://1derfulwallpaper.netfirms.com/ScreenShot.JPG as you will see none of the user defined mandatory fields have the red asterisk by them.

Thank you in advance.
Logged
BigGreen
Newbie
*

Karma: 1
Posts: 25


View Profile
« Reply #3 on: April 25, 2008, 09:20:43 AM »

You will need to cut & paste the link into a browser window....
Logged
Sparky
Moderator
Hero Member
*****

Karma: 85
Posts: 2,275


stop pushing all those buttons


View Profile
« Reply #4 on: April 25, 2008, 09:22:25 AM »

Your linking directly to a JPG apparently is not allowed...

Quote
Directly downloading images is not permitted on the Netfirms FREE plan. If you are the owner of this site, either ensure that this image is embedded in a web page, or upgrade to one of the Netfirms premium plans.
Logged

Did you update the paths in ttxcfg.cgi after moving TTX to your new location?   Undecided
To those seeking help.... please report back when you figure it out.  Cheesy
Sparky
Moderator
Hero Member
*****

Karma: 85
Posts: 2,275


stop pushing all those buttons


View Profile
« Reply #5 on: April 25, 2008, 09:23:57 AM »

No. Unfortunately it didn't work. When the initial form is displayed there are still no red asterisks by the custom defined mandatory fields.

Give me a little time to look closer at this later.

Meanwhile, leave the character entity in place... the slash will be no good for your HTML otherwise.


Wait... did you replace the slash with the char entity everyplace or just in the hidden field?  You'll have to re-name your field using the char entity for this to work.
« Last Edit: April 25, 2008, 09:25:42 AM by sparky672 » Logged

Did you update the paths in ttxcfg.cgi after moving TTX to your new location?   Undecided
To those seeking help.... please report back when you figure it out.  Cheesy
Sparky
Moderator
Hero Member
*****

Karma: 85
Posts: 2,275


stop pushing all those buttons


View Profile
« Reply #6 on: April 25, 2008, 09:42:16 AM »

I didn't notice this before but you have a second potential problem with those field names...

"xTelephone Extension" contains a space which also could break the HTML.

"xTelephone&#160;Extension" would be the equivalent.

See this thread for a more detailed discussion...

http://forum.unitedwebcoders.com/index.php/topic,598.0.html

Meanwhile, you can perform a quick test before re-naming any fields.  Just remove those two field names from your hidden field and see if the red asterisks at least appear for the two that remain.  This will yield big clues.

Quote
<input type="hidden" name="mandatory" value="xLocation,xRoom">
« Last Edit: April 25, 2008, 09:44:17 AM by sparky672 » Logged

Did you update the paths in ttxcfg.cgi after moving TTX to your new location?   Undecided
To those seeking help.... please report back when you figure it out.  Cheesy
arvin
Sr. Member
****

Karma: 10
Posts: 401


Yeah thats right !


View Profile
« Reply #7 on: April 25, 2008, 09:53:54 AM »

Hello,

You might want to try something like this

<td align=right class=lbl style1 style4><div align="center">Email Address<font color=red><sup>*</sup></font></div></td>

or just go here and look at the code .... it should help you

http://dev.csg.mts.net/cgi-bin/ttx.cgi?cmd=newticket&sid=&style=

Logged
BigGreen
Newbie
*

Karma: 1
Posts: 25


View Profile
« Reply #8 on: April 25, 2008, 10:08:22 AM »

I've tried adding the HTML markup codes for the / and space (as per the post by sparky672) but the asterisks still don't appear....
Logged
Sparky
Moderator
Hero Member
*****

Karma: 85
Posts: 2,275


stop pushing all those buttons


View Profile
« Reply #9 on: April 25, 2008, 10:14:30 AM »

I've tried adding the HTML markup codes for the / and space (as per the post by sparky672) but the asterisks still don't appear....

Where?

Did you rename those fields everywhere?  Setup, templates, etc?

You are using the optional Layout Designer module, right?  That was assumed.

The red asterisks will only appear if you're using the Layout Designer module since that's the Perl code that generates that part of the HTML automatically.  Otherwise, you must take Arvin's suggestion and add them manually.
Logged

Did you update the paths in ttxcfg.cgi after moving TTX to your new location?   Undecided
To those seeking help.... please report back when you figure it out.  Cheesy
BigGreen
Newbie
*

Karma: 1
Posts: 25


View Profile
« Reply #10 on: April 25, 2008, 10:19:25 AM »

Yes, We bought & installed all the modules so we are using Layout Designer.

I have just noticed that in the setup screen the "values" from the drop down lists also have the & character and spaces in them (e.g. "Bar & Restaurant").

Will this affect the HTML generated? Do I need to remove all spaces and HTML characters from the valies list too?

Thank you in advance...
Logged
Sparky
Moderator
Hero Member
*****

Karma: 85
Posts: 2,275


stop pushing all those buttons


View Profile
« Reply #11 on: April 25, 2008, 10:24:39 AM »

Yes, it could...

http://forum.unitedwebcoders.com/index.php/topic,598.0.html

Replace the "&" with an

Quote
&amp;
Logged

Did you update the paths in ttxcfg.cgi after moving TTX to your new location?   Undecided
To those seeking help.... please report back when you figure it out.  Cheesy
Sparky
Moderator
Hero Member
*****

Karma: 85
Posts: 2,275


stop pushing all those buttons


View Profile
« Reply #12 on: April 25, 2008, 10:29:00 AM »

Again, since you have the Layout Designer installed, red asterisks should be generated for any required field label automatically.

I've asked the questions several times now...

1.  Are you re-naming these fields everywhere?  Are the custom fields properly defined in Setup?  Did you check ttxcfg.cgi file to make sure everything has been renamed?

2.  Did you try my quick experiment?  Take out a couple of the longer names and just try it with two simple names?  This is a great easy test.

Quote
<input type="hidden" name="mandatory" value="xLocation,xRoom">
Logged

Did you update the paths in ttxcfg.cgi after moving TTX to your new location?   Undecided
To those seeking help.... please report back when you figure it out.  Cheesy
BigGreen
Newbie
*

Karma: 1
Posts: 25


View Profile
« Reply #13 on: April 25, 2008, 03:49:06 PM »

Hello,

I've changed all spaces, and other troublesome characters and tried renaming the fields to shorter names but unfortunately the problem still persists.

Even if the the characters where the problem the perl script shoudl still write the <font color=red><sup>*</sup></font> code into the outputted HTML document however this code does not appear by the custom defined fields.

I assume that the script which generated the new ticket is supposed to read the hidden tags in the template and put the asterisk by the fields when it writes the HTML?

Do you perhaps have any other suggestions?

Sorry to be such a nuisance....
Logged
Sparky
Moderator
Hero Member
*****

Karma: 85
Posts: 2,275


stop pushing all those buttons


View Profile
« Reply #14 on: April 25, 2008, 04:03:01 PM »

Do you perhaps have any other suggestions?

Yes, please try my previous suggestion so I can continue to help you.  This is a troubleshooting method.  Just pick ONE field that you haven't messed with yet, like xRoom.  It will tell us a lot.

<input type="hidden" name="mandatory" value="xRoom">

Quote
2.  Did you try my quick experiment?  Take out a couple of the longer names and just try it with two simple names?  This is a great easy test.

<input type="hidden" name="mandatory" value="xLocation,xRoom">
« Last Edit: April 25, 2008, 04:05:31 PM by sparky672 » Logged

Did you update the paths in ttxcfg.cgi after moving TTX to your new location?   Undecided
To those seeking help.... please report back when you figure it out.  Cheesy
Pages: [1] 2
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1 RC3 | SMF © 2001-2006, Lewis Media Valid XHTML 1.0! Valid CSS!
Page created in 0.029 seconds with 20 queries.