Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Column Title cannot be left blank.

Quote Reply
Column Title cannot be left blank.
Is there a way to change the Column Name in error messages when submitting a form?

Example:
"Column Title cannot be left blank."

In 1 of MY include_form.html, the label for the column "Title" is "Band Name".
So, I want the message to say "Band Name cannot be left blank."

Otherwise the submitter will look at the form and say, hmmm there is no
column named "Title". I use multiple add/modify forms and would like the
name of the column wrt errors, to be taken from "name" or "id" of the input field.
Otherwise what is the purpose of having id and name? One of them seems useless.
"Title" could be interpreted as Mr, Mrs, President or Sir. <g>

Code:
<label for="Title" class="name">Band Name: <span>*</span></label>
<div class="value">
<input type="text" id="Title" name="Title" value="<%if Title%><%escape_html Title%><%endif%>" class="text" />
</div>

I would also like to remove the word "Column" because fields do not appear to
be columns to the submitter. So simply "Band Name cannot be left blank." will suffice.

Too bad I think I know the answer :-(

Thanks,
Chris
RGB World, Inc. - Software &amp; Web Development.
rgbworld.com
Quote Reply
Re: [rgbworld] Column Title cannot be left blank. In reply to
In Links/Properties, click the link to the column that you want to change, and then change the 'Form Display' section to what you want.

The column will still be called 'Title' but the error message column names will change to whatever you choose.

Last edited by:

aus_dave: Apr 4, 2006, 8:43 PM
Quote Reply
Re: [aus_dave] Column Title cannot be left blank. In reply to
Hi,

Have it that way, but "Column Title cannot be left blank" will still show-up.

The word Column is still there!
Quote Reply
Re: [rascal] Column Title cannot be left blank. In reply to
Edit User/Language, Add...remove 'Column' from ADD_NOTNULL.
Quote Reply
Re: [aus_dave] Column Title cannot be left blank. In reply to
In Reply To:
Edit User/Language, Add...remove 'Column' from ADD_NOTNULL.

The only problem with that is it means that the field can be left blank which probably isn't going to help. There's not much point in having a link without a title.

What I would do is add a new column called Band_Name with the same atributes as Title, change the Title column to NULL and replace the Title field in the form with Band Name.

Code:
<label for="Band_Name" class="name">Band Name: <span>*</span></label>
<div class="value">
<input type="text" id="Band_Name" name="Band Name" value="<%if Band_Name%><%escape_html Band_Name%><%endif%>" class="text" />
</div>
....or something similar.

A bit tricky but possible.
Quote Reply
Re: [MJB] Column Title cannot be left blank. In reply to
The column can't be left blank - you can only modify that via Database/Links/Properties and edit the column properties.

The fix above only changes the language, that's all.
Quote Reply
Re: [aus_dave] Column Title cannot be left blank. In reply to
Thanks aus_dave,

It work for me!
Quote Reply
Re: [aus_dave] Column Title cannot be left blank. In reply to
In Reply To:
In Links/Properties, click the link to the column that you want to change, and then change the 'Form Display' section to what you want.
The column will still be called 'Title' but the error message column names will change to whatever you choose.[/quote]
That works fine except that I have have multiple add/modify forms, so the solution only works for 1 form and breaks
all other forms. Examples: Form 1 uses "Band Name", Form 2 uses "Venue Name", Form 3 uses "Company Name", etc...

I am just going to give up on the entire idea of using something other than "Title".
See my following post(s).

Thanks for your perfectly viable solution.
RGB World, Inc. - Software &amp; Web Development.
rgbworld.com
Quote Reply
Re: [MJB] Column Title cannot be left blank. In reply to
In Reply To:
What I would do is add a new column called Band_Name with the same atributes as Title, change the Title column to NULL and replace the Title field in the form with Band Name.

Code:
<label for="Band_Name" class="name">Band Name: <span>*</span></label>
<div class="value">
<input type="text" id="Band_Name" name="Band Name" value="<%if Band_Name%><%escape_html Band_Name%><%endif%>" class="text" />
</div>
[/quote]
That is a great idea and "almost" works, but poses many other problems.
The 1st problem is due to my multiple add/modify forms.
I would need to add 4 columns to links table (one for each of my main categories).
Then, in my link templates, I have to use <%Band Name%>,
<%
Venue Name%>, <%Company Name%> etc in place of <%Title%>.
That is easy enough, and still works perfectly.

I have all the solutions in this thread implimented in a dev install, and it is perfect, EXCEPT
I am worried about email notifications and any other place that might be using <%Title%>.

Does anyone know if leaving <%Title%> empty will cause other problems?
I.E. Missing or blank text in Emails, Errors, etc...

<%gripe%>
So as close as I am, it is an awful lot of work, just to use different static text on a form.
It is a problem that just compounds itself. I change the stupid static text on the form,
then errors make no sense. I change the
'Form Display' to correct the error message, but
that only works for 1 form. So instead I add additional columns(4) to link table.
This makes me use different tags in each link template respectively, fine. I am this far already. <g>

Which leaves me with an unused 'Title' field. Which might be used somewhere else, ie email templates.

So unless GT or someone has an easier solution, I digress and am going to use 'Title:' on ALL
my forms. This is a big drag to me. That I can't do something as simple as changing the static
text to be something different on each of my ad/modify forms (which wasn't implemented out-of-the-box either)
<%end gripe%>

Thanks to everyone for your perfect solutions to the pieces of the puzzle.
Maybe someone will be able to figure it out, so I don't have to give up.

Chris



RGB World, Inc. - Software &amp; Web Development.
rgbworld.com
Quote Reply
Re: [rgbworld] Column Title cannot be left blank. In reply to
I would just keep it as Title, and then add a global to parse the error loop or message for Title and change it to whatever you want it to be.

Adrian