Gossamer Forum
Home : Products : Gossamer Forum : Discussion :

Required Fields

Quote Reply
Required Fields
Hello,

I would like to make a new filed that I have added to the post table (via the editor) required. This field would be filled in on the form that is displayed when the client presses the "Post New" button for a forum. I set the "Not Null" attribute to "Yes" as indicated in the help page for the post editor. However, the field is treated as being optional when the form is submitted.

When time permits, could someone provide some insight as to what else I need to do?

Thank you,

John
Quote Reply
Re: [jbzipperian] Required Fields In reply to
Hi John,

Sorry for the delay - I've updated a couple files (all attached) that cause an error to happen when this is attempted. The first should replace admin/GForum/Post/Write.pm, and second replaces admin/GT/SQL/Table.pm. You'll also need to update the include_post_common_write.html and include_post_html_common_write.html templates, by adding this:

Code:


<%if post_error_other%>
<%body_font%><font color="red">Unable to post: <%post_error_other%></font><%/body_font%><br>
<%endif%>


It should go below the the "Invalid guest username" error, and before the "<input type=hidden name=temp_id....". Then you should see an error like: Unable to post: Column Foobar column cannot be left blank. for your "NOT NULL" column(s).


[Edit: admin/GT/SQL/Table.pm attachment deleted; see post below]

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com

Last edited by:

Jagerman: Aug 11, 2002, 7:17 PM
Quote Reply
Re: [Jagerman] Required Fields In reply to
Hi Jason,

Thank you.

John
Quote Reply
Re: [jbzipperian] Required Fields In reply to
I've just found a rather unfortunate bug with the two modules I uploaded before - using the GT/SQL/Table.pm one will break moved threads. To anyone who downloaded the one posted before, please download the two files attached to this post instead (admin/GT/SQL/Table.pm, and admin/GForum/Post.pm).

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com

Last edited by:

Jagerman: Aug 11, 2002, 7:16 PM