Skip to content

Feature request: Create new tag when in Object mode #36

@AaronMLB

Description

@AaronMLB

In almost all instances I'm using BulmaTagsInput in object mode (numeric id and string text value pairs), with XHR suggestion source, on an <input type="text"> field.

In certain use cases, it would be really useful to be able to create a new tag, rather than just selecting from existing ones.

Based on the following code currently creating a POST value of comma-delimited IDs...

    var tags = tagInputField.BulmaTagsInput().items;
    var values = [];
    tags.forEach(function(item) {
        values.push(item.id);
    });
    tagInputField.value = values.join(",");

... I would then expect any new values to be passed as an escaped text value, so the value received by the server might be something like 34,375,"Tokyo",698,"Badger\'s Lair",800 - and then obviously up to the server to create new records with the corresponding Tokyo and Badger's Lair text values, at the same time it records the IDs 34, 375, 698 and 800.

Might this be possible to implement, please?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions