Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@EVAL binding not working after update #419

Open
BigBlockStudios opened this issue Oct 31, 2023 · 2 comments
Open

@EVAL binding not working after update #419

BigBlockStudios opened this issue Oct 31, 2023 · 2 comments

Comments

@BigBlockStudios
Copy link

BigBlockStudios commented Oct 31, 2023

@eval binding is not working after update to latest: This is just showing the eval statement in the dropdown select box.

 {
        "MIGX_id":156,
        "field":"status",
        "caption":"Project Status",
        "description":"",
        "description_is_code":"0",
        "inputTV":"",
        "inputTVtype":"listbox",
        "validation":"required",
        "configs":"",
        "restrictive_condition":"",
        "display":"",
        "sourceFrom":"config",
        "sources":"",
        "inputOptionValues":"@EVAL return '--- Choose Status ---==||none' . $modx->runSnippet('migxLoopCollection',array('packageName'=>'projects','classname'=>'ProjectStatus','tpl'=>'@CODE:[[+status]]==[[+id]]','outputSeparator'=>'||'));",
        "default":"",
        "useDefaultIfEmpty":"0",
        "pos":3
      },
@Bruno17
Copy link
Owner

Bruno17 commented Oct 31, 2023

which MODX version? MODX 3 doesn't support @eval Binding any more. But there is a @snippet Binding now or @chunk Binding should also work. See MODX documentation about Bindings.

@BigBlockStudios
Copy link
Author

BigBlockStudios commented Oct 31, 2023

modx 3.0.4 and migx 3.0.2 - I did not know about the @eval being removed.

Yes, thank you the @snippet is working as advertised:

@SNIPPET migxLoopCollection {
    "packageName":"projects",
    "classname":"ProjectCategory",
    "tpl":"@CODE:[[+category]]==[[+id]]",
    "outputSeparator":"||"
    
    }```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants