Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Template Questions /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

How to Query dataobjects via AJAX based from select box?


Go to End


1413 Views

Avatar
BigD1214

Community Member, 24 Posts

27 January 2016 at 4:37am


What Im trying to accomplish is i have a page where you can see a list of dataobjects that on first load i Just hardcode. But i want to add the functionality that based on what the user selects for the dropdown select box the query is filtered. I Want to run this via a AJAX call. I have the function set up and working based on the selection, but where i am running into issues is in the template. I thought the correct way to go about it was to use renderWith but i cant get the loop template function to work. Im not sure how to get this to work. Any help would be greatly appreciated.