addForm.php and dragSortOrder Issues

3 posts by 2 authors in: Forums > CMS Builder
Last Post: July 5, 2012   (RSS)

By Perchpole - July 5, 2012

Hello, All

In recent weeks I've been busy experimenting with the addForm.php file and others like it found on this site.

It works really well.

The only problem I've noticed is that any record created with a form always ends up at the very bottom of the records listing in the CMSB back end.

Normally, all new records (added via the CMSB editor pages) go to the top of the listing - where you can see them - so this discrepancy is a bit annoying!

My guess is that this is due to the way dragSortOrder numbers are assigned. Presumably when creating a record through addForm.php there is no way a number can be allocated - or that's my theory - which is why the record ends up at the bottom of the pile.

Is this right - and is there anything that can be done about it?

:0)

Perch

Re: [Perchpole] addForm.php and dragSortOrder Issues

By Jason - July 5, 2012

Hi Perch,

You're right, if no value is assigned to dragSortOrder, then it will appear at the bottom of the pile. If you want to put your records at the top, you can assign dragSortOrder a value of time()

For example:

dragSortOrder = '".time()."',

This is the default value assigned by CMS Builder when a record is created.

hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/