I have a form that creates posts set to pending for approval. However, posts are also created in the backend too so users who manage the site and users who visit the site can create the posts. I need a way to when the user enters their post title, for it to cross check against existing posts (NOT entries since not all posts have an entry) and then alert the user that a post already exists (this is for a directory type website). Formidable support directed me to a hook `frm_new_post/`
Has anyone done something like this already?
Considering all the variations there could be in a post title due to spelling or typing errors, you may want to consider a soundex search in addition to an exact match. Since this a front end request, this is how I would approach the requirement:
Hi Victor, thanks for the tips! I appreciate that so much!
Please login or Register to submit your answer
That opens a can of worms. What will be done to check if the post exists? Is it by title only or some other set of data?
In this case, only by title. I use a Duplicate Title Checker plugin on the backend so I just need the same functionality on the frontend.
Seems like a query I'm not going to be able to write for you, but to help with others who may, should it be looking for exact word for word matches? Is this for SEO purposes?
The Post Title will be a first and last name so generally an exact match will work but I could see how a user might enter a middle name or something too so while I'd be happy with an exact match, ideally something that catches some of the same words in the title would probably be best.
Thanks for looking and trying to help!
As far as the post creation in formidable forms is concerned, if you are using separate first/last fields, you could add a new "read-only" field and combine those into that field and then set it to be "unique". That would help where you are at going forward, but not with anything that exists.