Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Utorok, 24. november 2026
O nás
Magazín
Otvorený softvér
CVS
Služby
Index  »  Projekty  »  phpMyEdit  »  Fórum  »  Insert line break via PME

phpMyEdit General     Insert line break via PME
Odoslať novú tému   Odpovedať na tému    
 
reber     Založený: 23.06.2003   Príspevky: 10  
Príspevok Zaslal: 2004-08-19 21:28
Návrat hore  Odpovedať s citátom     

Hello all,
I'm pretty certain this is a routine topic, but I can't find any answers...

How does one go about inserting a line break when adding/changing a record using PME fields?

I'm trying to introduce '\r' to some addresses. Everything I've tried shows up as typed, not converted to line breaks.

Thanks for the assistance,
Reber

 
reber     Založený: 23.06.2003   Príspevky: 10  
Príspevok Zaslal: 2004-12-02 22:40
Návrat hore  Odpovedať s citátom     

Apparently, this topic wasn't of interest to many other people, but I was annoyed by not being able to insert a line break from a PME edit field. I tried everything, believing that my problem was user error.

Eventually, I used a Write SQL expression [sqlw] to replace character '|' with '\n', presumably taking place after any preprocessing by PME.

This worked. Line breaks are now available by using | to signal termination when adding or editing records in this particular column (address_update).

*Note the [sql] expression preventing PME from removing the line break on a subsequent edit. It returns | to the editable record.*

example:

tedious|example
--becomes-->
tedious
example

Kód:

$opts['fdd']['address_update'] = array(
  'name'     => 'Updated Address',
  'select'   => 'T',
  'maxlen'   => 60,
  'sort'     => true,
  'options'  => 'VCD'
);
$opts['fdd']['address_update']['sql'] = 'REPLACE(address_update, "\n", "|")';
$opts['fdd']['address_update']['sqlw'] = 'REPLACE($val_qas, "|", "\n")';



 
michal     Založený: 17.06.2003   Príspevky: 537   Bydlisko: Slovakia
Príspevok Zaslal: 2004-12-03 13:04
Návrat hore  Odpovedať s citátom     

did you try 'textarea' as input field ? (you can have more rows when adding / changing)

 
ceaza     Založený: 05.09.2007   Príspevky: 3  
Príspevok Zaslal: 2008-12-11 00:24
Návrat hore  Odpovedať s citátom     

Thanks a lot after hours of searching :)

Kód:
$opts['fdd']['address_update']['sql'] = 'REPLACE(address_update, "\n", "|")';
$opts['fdd']['address_update']['sqlw'] = 'REPLACE($val_qas, "|", "\n")';


Worked like a dream

 
unknownstrangers     Založený: 14.11.2026   Príspevky: 1  
Príspevok Zaslal: 2026-11-14 11:04
Návrat hore  Odpovedať s citátom     

Subscription arrangements deserve careful attention when comparing different SEO access services. The SEO Tools Access SEMrush group buy subscription option can be evaluated by looking at its pricing and terms. Users should check renewal conditions, included features, and any limits that could affect regular work. Understanding these details makes it easier to compare the arrangement with other available subscriptions.

 
Odoslať novú tému   Odpovedať na tému    

Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok · Odkazový formulár · Prihláška
Upozorniť na chybu na PLATON.SK webstránke · Podmienky použitia · Ochrana osobných údajov