Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Google Sign In with OpenID


edited May 2012 in Framework

Am am trying to workout an autocomplete function for a textbox (Potentially a jQuery combobox if I decide it needs that.)

I am trying to figure out how to get the framework to return nothing but the JSON from a call to a within app handler. What's the way to do this? As it is it wraps it in the theme template and that is of couse not what I need at all.

Also, it'd be kind of nifty if we could figure out a way to build that into the form creation functionality "Widgetize" forms more or less.

widget = autocomplete
  options = "table.column"  

widget = datetimepicker



  • edited May 2012

    Seriously... you are getting to good at answering my questions before I have them...

    From the new api documentation

    $page->layout = false;
  • I think what you're looking for is this:

    $page->layout = false;
    $data = array ('name' => 'Jane');
    header ('Content-Type: application/json');
    echo json_encode ($data);

    The $page->layout = false stops it from sending the output to a template, but still passes the output through the gzip compression at the end.

    And that would be cool to have some standardized way of widgetizing more complex form field types. Now I'm going to be thinking about how that could work... ;)

Sign In or Register to comment.