Form navigation

Status
Not open for further replies.

vaulot

New Member
I would like to be able to go from the table view to a form and then once inside the form to be able to navigate from one record to the next (I am in read only). I have set the navigation option to yes in the form, but still I do not have any navigation button appearing (eg using the default template).

Thanks for the help.
 
We don't actually provide this feature at the moment, although it's kind of on the radar. Only tables have navigation, not forms.

-- hugh
 
OK I understand but the manual is then misleading... you should state that the option is still not implemented (see p. 4 of the last version !).

At any rate this will be a much needed feature.
 
My apologies, I spaced on that one (it's late!). I forgot Rob did add this recently, and it should work.

I'll leave this one to him, as its his baby, LOL!

-- hugh
 
Hi Hugh..

Thanks... Can you alert him to get back because I am probably missing something easy to amke it work.

Daniel
 
Hello

I made some progress :

For some reason (although I installed 1.5.1 the latest version) the file scroller.js had not been installed in the /form directory.

This is now done

Navigation works when I use the templates provided (default, bluesky, mint) but I would like to access in the form some of the data using $this->_data and the array does not seem to updated when going to the next record.

What should I include in the template to have it updated with current record ?

Another problem is that even when the navigation works, it only provides access to the fields that are listed in the table view not those that are only present in the form.
 
Darn, I posted a nice detailed reply, and somehow it got lost.

I took a look at the code, and basically it looks like the form scroll code should really be considered Beta at the moment, and only for use in a Read Only context. We're kind of cheating and using a simple JSON response to modify the existing DOM elements in place, rather than actually regenerate the complete form. Internally this means we're accessing the data as if it was a table row rather than a form, i.e. we completely bypass all the normal template and element rendering, which causes a number of issues.

I'll talk to Rob when he next gets online, and we'll hammer out of some of the issues. But for right now, "it is what it is".

-- hugh
 
Hugh

Thanks for the info, this is what I kind of figured out... I could in fact work out something by using the $this->_rowID variable to go from one record to the next but will probably wait for your slution since this seems in the work.
 
I vectored a few minutes with Rob today before he had to go and cook an haddock (yes, really), we'll look at this stuff in more depth tomorrow.

We have another thread on the go about the scroller, concerning filtering of the table. So this stuff should stay on our radar. If not, and I don't update this thread for a few days, feel free to bump it.

-- hugh
 
For some reason (although I installed 1.5.1 the latest version) the file scroller.js had not been installed in the /form directory.

doh! Ok I've included scroller.js in the installation xml file - mybad sorry!

I've also updated the SVN to improve the scroller.js code. I think the issue was that the scroller was only updating elements that were set to "show in table view".

Navigation works when I use the templates provided (default, bluesky, mint) but I would like to access in the form some of the data using $this->_data and the array does not seem to updated when going to the next record.

No it wouldn't. This is what happens

- Page is loaded via php (here is where $this->_data is craeted)
- On page load a form manager js class is created
- For each element on the form an element js class is created (different for each element type)
- these js element objects are then associated to the form.

- When you navigate with the scroller it sends an ajax request to the server to get the required record.
- the server sends this back as a JSON object
- each element js object receives an update command which will update its value by manipluating the DOM (i.e. the html )
- If using a custom template, for the object to be able to update its value, it will need to be encased in the correct div - e.g.

<div id="jos_fabrik_formdata_1___dropdown" class="readonly">One</div>

if you look at the source of the default template this is apprent.

hth
Rob
 
very good - did a kedgery (ekkk no idea how you spell that!) - rice peas, haddock and scambled eggs.
 
Ack, sounds great, but unfortunately they used to feed us that once a week for breakfast at my boarding school when I were a lad ... turns my stomach just thinking about it ... waking up at 5am to the smell of overcooked 'unidentified white fish'.

Marginally better than the smell of school cabbage being boiled to death, but not much.

Think of my school as very much like Hogwarts (Harry Potter, for anybody who has lived under a rock for the last ten years), but without the fun bits. And terrible, awful, stomach churningly bad food.

-- hugh
 
Back to Form navigation

Sorry to interrupt this interesting culinary thread...

but back to form navigation, I did what Rob suggested ie updated the scroller.js from the 1.0 SVN files (last revised 17:29:57, lundi 14 avril 2008).

Still when I am using the provided mint template, only the fields present in the table view are updated while all others are empty once I scroll through the records...

Thanks for the help.

Daniel
 
Salut Daniel

try updating again - i've fixed some bugs that had crept in.
If it still doesn't work can you install the firebug extension (www.getfirebug.com) for firefox and report back if it shows any javascript errors when you try to use the scroller

thx
Rob
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top