Custom conditions name

Custom conditions name

bagggasbagggas Posts: 2Questions: 1Answers: 0

how to change the name all of the conditions on searchBuilder? im using custom conditons at https://datatables.net/extensions/searchbuilder/customConditions but it doesnt work, is there the other way? or any examples? thanks before

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,237Questions: 1Answers: 2,599

    We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

  • Erwan CuinetErwan Cuinet Posts: 3Questions: 0Answers: 3
    Answer ✓

    Here is the code I use to customize it for string & html-num-fmt :smile:

        {
          "extend": "searchBuilder",
          "className": "btnBlue",
          "config": {
            "columns": [1, 2, 3, 4, 5, 6, 9],
            "conditions": {
              "string":
              {
                "=": {
                  "conditionName": "="
                },
                "!=": {
                  "conditionName": "≠"
                },
                "!null": {
                  "conditionName": "Non vide"
                },
                "null": {
                  "conditionName": "Vide"
                },
                "contains": {
                  "conditionName": "Comprenant"
                },
                "exclude": {
                  "conditionName": "Excluant"
                },
                "starts": {
                  "conditionName": "Commençant par"
                },
                "ends": {
                  "conditionName": "Terminant par"
                }
    
              },
              "html-num-fmt":
              {
                "=": {
                  "conditionName": "="
                },
                "!=": {
                  "conditionName": "≠"
                },
                "!null": {
                  "conditionName": "Non vide"
                },
                "<": {
                  "conditionName": "<"
                },
                "<=": {
                  "conditionName": "≤"
                },
                ">": {
                  "conditionName": ">"
                },
                ">=": {
                  "conditionName": "≥"
                },
                "null": {
                  "conditionName": "Vide"
                },
                "between": {
                  "conditionName": "Compris dans l'intervalle"
                },
                "!between": {
                  "conditionName": "Hors de l'intervalle"
                }
              }
    
            }
          }
        },
    
  • sandysandy Posts: 913Questions: 0Answers: 236

    Hi @bagggas ,

    What @Erwan Cuinet has suggested is correct. Documentation for editing a condition name is here.

    If you are still experiencing problems then we will need a test case as Colin has pointed out.

    Thanks,
    Sandy

  • bagggasbagggas Posts: 2Questions: 1Answers: 0
    edited October 2020

    and its working, i only need to change html-num-fmt with num

This discussion has been closed.