39 Posts
jjnxpct
10 years ago
Topic
Hi! I have a content type frontend form that allows users to submit information. The article title field is used in the frontend to allow the user to create a name for their submitted content item. Everything works fine, but when someone enters the same title in a next form submission they get an error because the alias is already created. So how do I prevent this? Is there a way to check if the title already existst in the database?
Get a Book for SEBLOD
39 Posts
jjnxpct
10 years ago
1
Level 1
Hi, solved it. I added a validation to the article title field for the frontend form. I used the Ajax 'Availability' validation on the #__content table, Column :'title'.
215 Posts
cubist
10 years ago
0
Level 2

Does this still prompt the user for a new title or does it automatically generate a different alias, e.g. by adding a digit, or other?

IN my case, I did use the Concat type field using

<content> to add the next id separate with " - ", e.g.

#trf_owner#||#trf_patient#||#trf_clinic_name#||<content>

251 Posts
Viktor Iwan
10 years ago
0
Level 1
Yeah.. that's right.. glad you find a workaround...
693 Posts
rpoy
10 years ago
0
Level 1
Hi!

Another way that I have found to do this is to use Simon's SD Field Concat found here.

You might want to create a title using the first_name and last_name, but if the same name is used more than once then changing their name is not an option... So you can concatenate first_name, last_name and date for example...

Hope that helps!

Get a Book for SEBLOD