I have a project that the user choose a tag (tags are already created) and save the information.

I try save a entry which has a tag field, all the stuff saves, but the tags don't. I try search information about that, but any where have a solution or the solution doesn't work.

I try entry form.


Hard to know without seeing some template code, but the syntax for saving existing tags on a front-end entry form looks like this:

<select multiple name="fields[fieldHandle][]">
    <option value="13">Tag Name One</option>
    <option value="42">Tag Name Two</option>
    <option value="144">Tag Name Three</option>

Replace fieldHandle with the actual handle of your Tags field and 13, 42 and 144 with the actual Tag IDs.

There's a great list of examples for what front-end inputs need to look like for Craft fields here you might find useful: https://straightupcraft.com/articles/craft-cms-field-guide-twig?view=input

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.