I am at a loss as to how to start implementing this feature.
I have a form through which a user submits a photo, with title, description and category. I was thinking of simply appending an extra input to my form, but I need multiple tags to relate to each post.
The feature should work as follows:
1- The user is initially presented with a few tags, probably with jQuery/ajax, it doesn’t matter which ones they are (they could be the first in the table, or random, or most used)
2- The user can pick these tags, and they are inserted into the form.
3- The user can also insert new tags, which are then inserted into the table on submit (but not earlier)
4- The tags then appear under the submitted item, and are clickable, to show all items with the same tag (irrelevant of other tags).
I’ll start working on these step by step. I’m actually still lost as to how and where to utilize the suggestions (aka I’m swimming in deep waters and I just learnt how to stay afloat).
So I’ll make a jQuery script that calls the tag_table via ajax in order to give some suggestions. If it finds any matching tag, display it as used. If it doesn’t, display it as used, but submit in on “submit”. Then pass the tag ids to a php file that posts the tags to the tag_table, then posts them to the rel table, as multiple rows with the same photo_id but different tag_id.
Did I get that right?