Repeatable Fields
#84
Posted 29 February 2012 - 04:35 PM
I've done what WillyC, suggested above and still got some issues that diogo mentioned.
I'll continue to test it, and see how it goes.
#86
Posted 29 February 2012 - 04:45 PM
@somartist | modules created | support me, flattr my work flattr.com
#89
Posted 03 March 2012 - 09:05 PM
The field-template context is now committed to the source, so it is ready to use. Please let me know how it works for you guys. You can access it from any template or repeater field by clicking on a field name in the asmSelect list. When you first add a new field to an existing asmSelect, the context option isn't yet available. You have to save the template before you'll see the option to alter its context.
When editing a field (from Setup > Fields), you will also see a context pulldown in the upper right corner. This is just a shortcut when/if you want it.
--
Edit: you may need to hit 'reload' in your browser once or twice if you aren't seeing the field context option at first (old files may be stuck in cache).
Doesn't this deserve a new thread? Shame it's hidden somewhere here in the repeater thread, some might miss this easily.
BTW. found an issue with repeater field label specified doesn't get saved on first step after saving.
@somartist | modules created | support me, flattr my work flattr.com
#90
Posted 04 March 2012 - 08:54 AM
when
what?
Doesn't this deserve a new thread? Shame it's hidden somewhere here in the repeater thread, some might miss this easily.
Maybe so, I'll try to split it.
BTW. found an issue with repeater field label specified doesn't get saved on first step after saving.
I tried creating a new field using the Repeater type, but the label wasn't lost. But I had experienced the issue you describe once before (and fixed it), though not specific to a repeater field. Let me know if you can think of any other details on how to reproduce it.
So, this is live in stable version?
Yep
#91
Posted 04 March 2012 - 11:42 AM
Edit:
Repeaters doesn't get copied when using page clone.
When I create page with repeaters and add 1-2 elements and clone that page with children, the repeater elements created doesn't get cloned, AND worse the original page loses it's repeater elements too.
@somartist | modules created | support me, flattr my work flattr.com
#92
Posted 04 March 2012 - 06:44 PM
Now seems a proper time to bring this up again, so my suggestion is to have a direct link to the default properties of a fieldtype in the modal window of the context-based settings.
#93
Posted 05 March 2012 - 01:31 PM
I found a bug...if you use a date field inside a repeater with the option to automatically fill with today date, this will create empty data inside repeater and if i try to delete them, they increase....removing that option on the date field it works good with no problems.
#94
Posted 05 March 2012 - 01:52 PM
<?
$c=$pages->get("name=$camp");
$c->setOutputFormatting(false);
$repeater = $fields->get('stats');
$item = $repeater->type->getBlankRepeaterPage($c, $repeater);
$item->day = strtotime(date("d-m-Y"));
$item->counter = 1;
$item->iplist = $userip."|";
$c->stats->add($item);
$c->save();
?>
What i have is a strange behavior in admin. The field looks empty and if I click on "add item" it shows me the fields filled with the data i saved via api, but accessing the field via api it is empty...
#95
Posted 06 March 2012 - 09:44 PM
this will create empty data inside repeater and if i try to delete them, they increase....removing that option on the date field it works good with no problems.
Thanks for the report Sevarf2. Just to make sure I understand, what do you mean by: they increase? Maybe that question will answer itself when I try tomorrow.
What i have is a strange behavior in admin. The field looks empty and if I click on "add item" it shows me the fields filled with the data i saved via api, but accessing the field via api it is empty...
Taking a look in the code, the getBlankRepeaterPage returns a page that is in unpublished/hidden status. It uses that combination for what it calls 'ready' pages. In order to make it one that's published for use as a live repeater, those statuses have to be removed. Try adding this before your $c->save() and let me know if that fixes it?
$item->removeStatus(Page::statusUnpublished); $item->removeStatus(Page::statusHidden);
I didn't think people were already using it at this API level yet.
#99
Posted 12 March 2012 - 07:55 AM
Thanks,
Ryan
#100
Posted 13 March 2012 - 01:53 PM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users













