Forums

check if input already in database

sken 22 Apr, 2008
hello,

i'm going to create several forms for my webpage.

There are two thing that must be checked.
People can sign on their teams for sport events, but only 12 teams can sign on.
The second is, every team should have a unique name.

is it possible to check these with chrono?

sorry for my english🙂
GreyHead 22 Apr, 2008
Hi sken,

There's nothing built into ChronoForms that will do this but it's entirely possible to write code that will do this.

You could create a form with 12 blanks and replace a blank with a team name each time one is submitted. You'd need to store the data somewhere - probably in a database table - and check that the names are unique before saving them.

Bob<br><br>Post edited by: GreyHead, at: 2008/04/22 18:28
sken 22 Apr, 2008

There's nothing built into ChronoForms that will do this but it's entirely possible to write code that will do this.



sounds good :laugh:

I tried some different form tool before, but no one could do that.

I'm also new to ChronoForms, so I need a little help.
Creating the form won't be a problem for me.

You could create a form with 12 blanks and replace a blank with a team name each time one is submitted. You'd need to store the data somewhere - probably in a database table - and check that the names are unique before saving them.



Inputs will be saved in mysql database. Do I need to create the tables on my own? Or Will Chrono do that?

greets sken
GreyHead 23 Apr, 2008
Hi sken,

You can click the 'Create table' list in the Forms Manager to create a table but you need to get your form code correct first.

At the beginning of the form code you'll need a to read the database table, count the number of teams and then create you form to suit.

Bob
This topic is locked and no more replies can be posted.