HerTha Posted September 14, 2014 Share Posted September 14, 2014 Hi all, I am trying to copy some existing data stored in a repeater field "itemlist" to a ProFields table "itemtable" using this PHP snippet: <?php include("./index.php"); // bootstrap PW $page_name = "apage.html"; $p = wire("pages")->get("name=$page_name"); $p->of(false); if($p) { foreach($p->itemlist as $item) { $item->of(false); if($item->il_code != '') { echo "<p>Element " . $item->il_code . " : " . $item->il_desc . " belongs to page " . $page_name . "</p>"; $new_row = $p->itemtable->makeBlankItem(); $new_row->code = $item->il_code; $new_row->desc = $item->il_desc; $new_row->avail = $item->il_avail; $p->itemtable->add($new_row); } } $p->save(); } Basically that works well - problem is that all HTML tags get removed when storing the text fields in the table. I have checked to make sure that no textformatters are specified in columns settings of that table. Are there any additional sanitizers etc. I need to take care of when dealing with such table fields? TIA, HerTha Link to comment Share on other sites More sharing options...
Lars282 Posted June 4, 2015 Share Posted June 4, 2015 Just having the same issue - did you find a solution to this? Link to comment Share on other sites More sharing options...
HerTha Posted June 8, 2015 Author Share Posted June 8, 2015 Well, I realized that another approach (using PageTable) was actually more suitable for my specific needs, so I did not dig any deeper into the above issue. I believe it has been brought up somewhere in the ProFields support area, though. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now