The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Creating values for HTML post form from JStree checkbox list

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
  • #30172


    I am just starting out with JQuery and Javascript, and adapting a nested set of checkbox inputs to make use of jstree checkbox behaviours. After realising that each item had to be an anchor tag to be recognized by the jstree code, I am now unsure how to generate values from the items for a POST form submission. Previously they were checkbox inputs, and I would like to be able to keep them this way so that the form would still function if Javascript were turned off. wrapping inputs in the anchor tag resulted in two checkboxes for each item, one styled and behaviourally controlled by JStree, the other ignored. I assume this isn’t the direction to go.

    Any advice on how to achieve this would be gratefully received.

    I am booting JStree with the following config code –

    { $('.nested-category').jstree({
    ui: { theme_name : "checkbox" },
    plugins : ["checkbox", "themes", "html_data", "ui" ]

    Here is a simplified version of the form which the JStree code effects, but which can’t submit values.

Viewing 1 post (of 1 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.