Is there a way to merge form tools?

Sebastian Cuesta
Sebastian Cuesta Posts: 1
edited November 9 in Peer Support

Can I assign a drop-down item, for example "glass inspection" to specific boxes, and "caulking" to other specific boxes?

Answers

  • Peter Noyes
    Peter Noyes Posts: 42
    edited December 5

    If you are asking if it possible to auto-populate checkboxes based upon what is selected in a dropdown, then the answer is yes, but it involves javascript. See the attached sample. There is a document level script that would need to be tweaked for your use case:

    var dropdown = this.getField("Dropdown");
    dropdown.setAction("Keystroke", "processKeystroke(event)");

    function processKeystroke(event) {
    if (event.changeEx === "")
    return;

    event.rc = true;
    var val = event.changeEx;

    this.getField("A").value = (val === "A+C") ? "Yes" : "";
    this.getField("B").value = (val === "B+D") ? "Yes" : "";
    this.getField("C").value = (val === "A+C") ? "Yes" : "";
    this.getField("D").value = (val === "B+D") ? "Yes" : "";
    }