Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2015-07-30 19:16:55
- raminrahimi
- Member
- From: India
- Registered: 2013-03-19
- Posts: 277
how to make a custom field to be unique
i have crated a custom field, it’s name is serial . is it possible to make that unique? it mean don’t accept the repeated code on each article.
thanks TXP team :-)
Offline
Re: how to make a custom field to be unique
One way would be to auto- fill that with the article id
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Online
Offline
#4 2015-08-10 16:03:37
- raminrahimi
- Member
- From: India
- Registered: 2013-03-19
- Posts: 277
Re: how to make a custom field to be unique
it’s not XY question !
it’s clear and needed thing, sorry my english is not very well
i prepared a website to my client and that’s online tracking, i’ve installed wet_haystack plugin that can search through exact option, i chose a custom_field
then i write the serial of each tracking to that custom_field, then search box will find that article
but, now if the author entered duplicate serial of a tracking in to two articles, that should alert or reject.
i hope to understand
may be that’s impossible, but i saw many impossible things solved to textpatter, because of that i asked.
thanks
Last edited by raminrahimi (2015-08-10 16:05:36)
Offline
Re: how to make a custom field to be unique
Wouldn’t it be simpler to user the article ID instead and not use a custom field at all? That is auto-generated and guaranteed unique, because it’s the primary key for the article table.
If not, how does the client/author generate serials and can you give an example of such a serial?
Offline