This topic is locked

Visual Editor

7/20/2009 4:28:24 AM
PHPRunner General questions
S
Shankar author

Hi Users.

I've had no problems dragging and dropping fields/objects between columns in the generated table. But I tried to drag a field called "details" up next to the page details and it failed (it moved in VE but didn't show in the generated pages).

I then inserted a new, one row table at the top of the page and typed "insert here" in text and then dragged my details field/object into this - again success in VE but when I view the generated files in my browser, there were no details, just the words "insert here"!
If it makes a difference, the field in question is a concatenated field from joined tables (ie. a custom view).
Regards,

Shankar

J
Jane 7/20/2009

Hi,
field values are filled between {BEGIN grid_row}{BEGIN grid_record} and {END grid_record}{END grid_row} tags only.

To show field values at the beginning on the page use custom event (Insert PHP code snippet option on the Visual Editor tab).

S
Shankar author 7/21/2009

Hi,

field values are filled between {BEGIN grid_row}{BEGIN grid_record} and {END grid_record}{END grid_row} tags only.

To show field values at the beginning on the page use custom event (Insert PHP code snippet option on the Visual Editor tab).


Thanks Jane, that explains it! Perhaps this feature could be added in a future release?

Anyway, back to the present - would it be possible to give me a code example?
Rgds,

Shankar

J
Jane 7/21/2009

Shankar,
actual event code is dependent on page and table you use.

Please give me more detailed descirption of what field value you want to show and where you want to show this value.

S
Shankar author 8/14/2009

Shankar,

actual event code is dependent on page and table you use.

Please give me more detailed descirption of what field value you want to show and where you want to show this value.


I inserted this snippet (which I found by searching this forum), replacing field1, field2 and tablename with my own.
global $conn;

$str = "<table><tr><td>Field1</td><td>Field2</td></tr>"

$sql = "select Field1,Field2 from TableName";

$rs = db_query($sql,$conn);

while($data = db_fetch_array($rs))

$str.= "<tr><td>".$data["Field1"]."</td><td>".$data["Field2"]."</td></tr>";

$str.= "</table>";

echo $str;
...but it didn't work

Sergey Kornilov admin 8/14/2009

I recommend to post your application to Demo Account (use 'Demo Account' button on the last screen in program). Then open a ticket at http://support.xlinesoft.com sending your Demo Account URL for investigation.

mikue from germany 8/14/2009

missing at end
$str = "<table><tr><td>Field1</td><td>Field2</td></tr>"[color=#ff0000];