This topic is locked
[SOLVED]

 Options for fields on a View page?

1/9/2011 4:06:46 PM
PHPRunner General questions
B
brhipple author

I have a master detail relationship (clients & contacts) in which I show the detail record(s) on the the edit page of the master. The issue I have is that the only a inline-edit is available for the detail records which means it uses the view page settings (for the display & in-line edit). The details tables has a bunch of fields which must be displayed and edited but it looks like my only options are to format the view page either horizontally or vertically. Which means the user must scroll to get to the information. Is their any other option that I am missing?
Here is a screen shot:
http://screencast.com/t/IuQcf5vLm1sS

B
brhipple author 1/12/2011



I have a master detail relationship (clients & contacts) in which I show the detail record(s) on the the edit page of the master. The issue I have is that the only a inline-edit is available for the detail records which means it uses the view page settings (for the display & in-line edit). The details tables has a bunch of fields which must be displayed and edited but it looks like my only options are to format the view page either horizontally or vertically. Which means the user must scroll to get to the information. Is their any other option that I am missing?
Here is a screen shot:
http://screencast.com/t/IuQcf5vLm1sS


The above screen shot does not do this issue justice, as there are about 7 more fields that are not shown. Is there a way that I could just add a hyperlink/button something like "edit this (selected) record" that would put the current displayed detail record in full blown edit mode (not inline)?

Sergey Kornilov admin 1/13/2011

I see what you mean. Detail tables are always edited in inline mode.
What you can do is to format details list page so each record occupies two table rows and rearrange fields to get a better presentation.
Here is an example:

http://demo.asprunner.net/volinrok_yahoo_com/Project242/Users_edit.php?editid1=4
Click inline edit of details record to see what I mean.

B
brhipple author 1/13/2011



I see what you mean. Detail tables are always edited in inline mode.
What you can do is to format details list page so each record occupies two table rows and rearrange fields to get a better presentation.
Here is an example:

http://demo.asprunner.net/volinrok_yahoo_com/Project242/Users_edit.php?editid1=4
Click inline edit of details record to see what I mean.


Thanks Sergey for looking into this. The problem with this solution is that there is no column headers for the wrapped fields. BTW - Did you have to edit the HTML directly to get this behavior? Is there a way to add a link/button (with custom code?) to do the full edit (view) of the record?

Sergey Kornilov admin 1/13/2011

I've added a new table row in Visual Editor and dragged a few fields to that row. A few changes in HTML mode were required as well.
Btw, you may want to turn on Vertical mode for details table and add a couple more columns. Then drag field labels and fields itself there. Just in case check 'How to build advanced webforms' tutorial at http://xlinesoft.com/phprunner/php-database.htm
You can also add a link/button to the edit page. The typical edit page URL is tablename_edit.php?editid1=XXX where XXX is record ID. The best approach is to set 'View as' type of one of fields to 'Custom' and use the following code there:

$value = "<a href=tablename_edit.php?editid1=".$data["KeyColumn"].">Edit<a/>";


Replace tablename and KeyColumn with the actual table and key column name.

B
brhipple author 1/17/2011



I've added a new table row in Visual Editor and dragged a few fields to that row. A few changes in HTML mode were required as well.
Btw, you may want to turn on Vertical mode for details table and add a couple more columns. Then drag field labels and fields itself there. Just in case check 'How to build advanced webforms' tutorial at http://xlinesoft.com/phprunner/php-database.htm
You can also add a link/button to the edit page. The typical edit page URL is tablename_edit.php?editid1=XXX where XXX is record ID. The best approach is to set 'View as' type of one of fields to 'Custom' and use the following code there:

$value = "<a href=tablename_edit.php?editid1=".$data["KeyColumn"].">Edit<a/>";


Replace tablename and KeyColumn with the actual table and key column name.


That works great! Thanks so very much!