v1.0 admin view render question

edited March 2013 in Modules
Hello again,

I'm "porting" an advanced module of the Sphider site indexer that I bashed together from a v.093 install to v1.0.

Obviously, the rendering of views is slightly different, and looking at other examples (the "Page Analysis" module) I've solved those issues. However, I notice that the default view render includes an enclosing form, and with the code I'm trying to port, there is a form already in the view, with a "target" attribute.

So my initial question is, how can I configure the enclosing form - particularly the attributes? I've seen that the "form_action" key can be passed to the array argument for $this->fuel->admin->render(), but I'm not sure if attributes like "target" can be set?

I could use some javascript to effect this on load, but it seems to be a legitimate configuration issue.

The requirement I have is that the logs generated by the Sphider implementation can be sent to an iframe, hence the form I was using in the view had a target with the name of the iframe.

That feature isn't without problems itself (eg timeout issues) but the issue of configuring the form in detail still has relevance.

Comments

  • edited 11:46AM
    Setting the target value of the form is currently something that will need to be done with javascript. FUEL expects all forms to be submitted within the same window. You could try adding this to your advanced module's view file:
    $(function(){
    $('#form').attr('target', 'my_target');
    });
  • edited 11:46AM
    Yep - tried that and it works fine, I just wondered if there was any value in allowing attributes to be altered via an array?

    The Admin class could do with a good tutorial - I hadn't appreciated how much work has gone into it!
  • edited 11:46AM
    Yes... there are quite a few tutorials that I think could help with the new changes in 1.0.
Sign In or Register to comment.