User tests: Successful: Unsuccessful:
What here:
Links:
XML that I use for testing:
<field name="test" type="repeatable" icon="list"
label="Test" description="Test descr"
default=""
maximum="5">
<fieldset hidden="true" repeat="true">
<field name="test_color" type="color" default="#eee"
label="color" description="test_color" />
<field name="test_tag" type="tag"
label="JTAG" description="test_tag" mode="nested"
multiple="true" />
<field name="test_list" type="list" default="1"
label="test_list" description="test_list" >
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>
<field name="test_text" type="text"
label="test_text" description="test_text" />
<field name="test_textarea" type="textarea"
label="textarea" width="100" />
<field name="test_radio" default="0" type="radio"
label="test_radio" description="test_radio">
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>
<field name="test_checkbox1" type="checkbox"
label="checkbox1" description="test_checkbox1" />
<field name="test_checkboxes" type="checkboxes"
label="checkboxes" description="test_checkboxes" >
<option value="a">A</option>
<option value="b">B</option>
<option value="c">C</option>
<option value="d">D</option>
</field>
<field name="test_media" type="media" directory=""
label="media" description="test_media"/>
</fieldset>
</field>
And of course can be used existing, if someone already have.
Who brave enough to make a test?
Hi Fedik,
I'm referring to another post (#3573) where you were so kind to help me out.
Here is my XML (http://d.pr/n/SWVS) and my screenshot (http://d.pr/i/NAly) As you see the modal is a little bit too small to show some fields of the grouped list. It would be nice of the modal would bit a little bit higher.
As you can also see there is no "cancel and do not save"-button in the modal. If I would like to discard changes only from the repeatable-list I'm not able to do so.
Thanks for your help :-)
ok, I see, looks like chosen.js problem that used for select`s, I think the bigger height will not really help ... I will try check more
About "cancel" I already told, you can "cancel" your form, as you do for any other field
Hi Fedik,
thanks for your fast response. Wow
Well, maybe I'm too stupid, but what do you mean with "cancel for any other field"? I would like to leave the modal without saving something, if I do not want to.
How can I do that?
I mean that the main form already has "Save" and "Cancel" buttons that you use for save and cancel actions.
Hi!
This change works really well! But it's missing a way to cancel changes. Hitting ESC key also saves changes.
About "cancel" I already told, you can "cancel" your form, as you do for any other field
Then you have to discard any other changes to other items on the page. It works, but if possible a "Cancel" on the modal popup would be great.
Hitting ESC key also saves changes.
it do not save any data until you not click "Save" to submit the form
Then you have to discard any other changes to other items on the page. It works, but if possible a >> "Cancel" on the modal popup would be great
That's what I meant - if I change some fields and edit some values of the repeatable-field, I have to discard all changes.
the repeatable-field it nothing more than just a collection of fields (that you can have in the main form), but in popup
but I understand what you mean
about size problem that @Ehrenwert wrote
currently I see only one solution: it disable the chosen.js in modal window,
thoughts?
Description | <p>What here:</p> <ul> <li>complete rewritten script</li> <li>partially changed the field markup</li> <li>fixed multiple instances on the one page</li> <li>fixed rows duplication</li> <li>fixed some fields that stopped work right, after duplication</li> <li>fixed "to big modal" - added scroll</li> <li>each new row will be added after the row where the button "add" was clicked alternative for "sortable" <img class="emoji" title=":wink:" alt=":wink:" src="https://github.global.ssl.fastly.net/images/icons/emoji/wink.png" height="20" width="20" align="absmiddle"> </li> </ul><p>Links:</p> <ul> <li> <a href="http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=33392&start=0">[#33392] Repeatable form fields fix</a>, maybe some other already exist to </li> <li>related on github, that I found <a href="https://github.com/joomla/joomla-cms/issues/3192" class="issue-link" title=" [#30781] Small changes to jForm and jField to allow for repeatable form elements ">#3192</a> <a href="https://github.com/joomla/joomla-cms/issues/3564" class="issue-link" title="[#30781] Repeatable field ">#3564</a> <a href="https://github.com/joomla/joomla-cms/issues/3573" class="issue-link" title="Strange Repeatable-Form-Field behaviour">#3573</a> <a href="https://github.com/joomla/joomla-cms/pull/3214" class="issue-link" title="[#33392] Fix repeatable form field javascript">#3214</a> </li> </ul><p>XML that I use for testing:</p> <div class="highlight highlight-xml"><pre><span class="nt"><field</span> <span class="na">name=</span><span class="s">"test"</span> <span class="na">type=</span><span class="s">"repeatable"</span> <span class="na">icon=</span><span class="s">"list"</span> <span class="na">label=</span><span class="s">"Test"</span> <span class="na">description=</span><span class="s">"Test descr"</span> <span class="na">default=</span><span class="s">""</span> <span class="na">maximum=</span><span class="s">"5"</span><span class="nt">></span> <span class="nt"><fieldset</span> <span class="na">hidden=</span><span class="s">"true"</span> <span class="na">repeat=</span><span class="s">"true"</span><span class="nt">></span> <span class="nt"><field</span> <span class="na">name=</span><span class="s">"test_color"</span> <span class="na">type=</span><span class="s">"color"</span> <span class="na">default=</span><span class="s">"#eee"</span> <span class="na">label=</span><span class="s">"color"</span> <span class="na">description=</span><span class="s">"test_color"</span> <span class="nt">/></span> <span class="nt"><field</span> <span class="na">name=</span><span class="s">"test_tag"</span> <span class="na">type=</span><span class="s">"tag"</span> <span class="na">label=</span><span class="s">"JTAG"</span> <span class="na">description=</span><span class="s">"test_tag"</span> <span class="na">mode=</span><span class="s">"nested"</span> <span class="na">multiple=</span><span class="s">"true"</span> <span class="nt">/></span> <span class="nt"><field</span> <span class="na">name=</span><span class="s">"test_list"</span> <span class="na">type=</span><span class="s">"list"</span> <span class="na">default=</span><span class="s">"1"</span> <span class="na">label=</span><span class="s">"test_list"</span> <span class="na">description=</span><span class="s">"test_list"</span> <span class="nt">></span> <span class="nt"><option</span> <span class="na">value=</span><span class="s">"1"</span><span class="nt">></span>JYES<span class="nt"></option></span> <span class="nt"><option</span> <span class="na">value=</span><span class="s">"0"</span><span class="nt">></span>JNO<span class="nt"></option></span> <span class="nt"></field></span> <span class="nt"><field</span> <span class="na">name=</span><span class="s">"test_text"</span> <span class="na">type=</span><span class="s">"text"</span> <span class="na">label=</span><span class="s">"test_text"</span> <span class="na">description=</span><span class="s">"test_text"</span> <span class="nt">/></span> <span class="nt"><field</span> <span class="na">name=</span><span class="s">"test_textarea"</span> <span class="na">type=</span><span class="s">"textarea"</span> <span class="na">label=</span><span class="s">"textarea"</span> <span class="na">width=</span><span class="s">"100"</span> <span class="nt">/></span> <span class="nt"><field</span> <span class="na">name=</span><span class="s">"test_radio"</span> <span class="na">default=</span><span class="s">"0"</span> <span class="na">type=</span><span class="s">"radio"</span> <span class="na">label=</span><span class="s">"test_radio"</span> <span class="na">description=</span><span class="s">"test_radio"</span><span class="nt">></span> <span class="nt"><option</span> <span class="na">value=</span><span class="s">"1"</span><span class="nt">></span>JYES<span class="nt"></option></span> <span class="nt"><option</span> <span class="na">value=</span><span class="s">"0"</span><span class="nt">></span>JNO<span class="nt"></option></span> <span class="nt"></field></span> <span class="nt"><field</span> <span class="na">name=</span><span class="s">"test_checkbox1"</span> <span class="na">type=</span><span class="s">"checkbox"</span> <span class="na">label=</span><span class="s">"checkbox1"</span> <span class="na">description=</span><span class="s">"test_checkbox1"</span> <span class="nt">/></span> <span class="nt"><field</span> <span class="na">name=</span><span class="s">"test_checkboxes"</span> <span class="na">type=</span><span class="s">"checkboxes"</span> <span class="na">label=</span><span class="s">"checkboxes"</span> <span class="na">description=</span><span class="s">"test_checkboxes"</span> <span class="nt">></span> <span class="nt"><option</span> <span class="na">value=</span><span class="s">"a"</span><span class="nt">></span>A<span class="nt"></option></span> <span class="nt"><option</span> <span class="na">value=</span><span class="s">"b"</span><span class="nt">></span>B<span class="nt"></option></span> <span class="nt"><option</span> <span class="na">value=</span><span class="s">"c"</span><span class="nt">></span>C<span class="nt"></option></span> <span class="nt"><option</span> <span class="na">value=</span><span class="s">"d"</span><span class="nt">></span>D<span class="nt"></option></span> <span class="nt"></field></span> <span class="nt"><field</span> <span class="na">name=</span><span class="s">"test_media"</span> <span class="na">type=</span><span class="s">"media"</span> <span class="na">directory=</span><span class="s">""</span> <span class="na">label=</span><span class="s">"media"</span> <span class="na">description=</span><span class="s">"test_media"</span><span class="nt">/></span> <span class="nt"></fieldset></span> <span class="nt"></field></span> </pre></div> <p>And of course can be used existing, if someone already have.</p> <p>Who brave enough to make a test? <img class="emoji" title=":smirk:" alt=":smirk:" src="https://github.global.ssl.fastly.net/images/icons/emoji/smirk.png" height="20" width="20" align="absmiddle"></p> | ⇒ | <p>What here:</p> <ul> <li>complete rewritten script</li> <li>partially changed the field markup</li> <li>fixed multiple instances on the one page</li> <li>fixed rows duplication</li> <li>fixed some fields that stopped work right, after duplication</li> <li>fixed "to big modal" - added scroll</li> <li>each new row will be added after the row where the button "add" was clicked, as alternative for "sortable" <img class="emoji" title=":wink:" alt=":wink:" src="https://github.global.ssl.fastly.net/images/icons/emoji/wink.png" height="20" width="20" align="absmiddle"> </li> </ul><p>Links:</p> <ul> <li> <a href="http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=33392&start=0">[#33392] Repeatable form fields fix</a>, maybe some other already exist to </li> <li>related on github, that I found <a href="https://github.com/joomla/joomla-cms/issues/3192" class="issue-link" title=" [#30781] Small changes to jForm and jField to allow for repeatable form elements ">#3192</a> <a href="https://github.com/joomla/joomla-cms/issues/3564" class="issue-link" title="[#30781] Repeatable field ">#3564</a> <a href="https://github.com/joomla/joomla-cms/issues/3573" class="issue-link" title="Strange Repeatable-Form-Field behaviour">#3573</a> <a href="https://github.com/joomla/joomla-cms/pull/3214" class="issue-link" title="[#33392] Fix repeatable form field javascript">#3214</a> </li> </ul><p>XML that I use for testing:</p> <div class="highlight highlight-xml"><pre><span class="nt"><field</span> <span class="na">name=</span><span class="s">"test"</span> <span class="na">type=</span><span class="s">"repeatable"</span> <span class="na">icon=</span><span class="s">"list"</span> <span class="na">label=</span><span class="s">"Test"</span> <span class="na">description=</span><span class="s">"Test descr"</span> <span class="na">default=</span><span class="s">""</span> <span class="na">maximum=</span><span class="s">"5"</span><span class="nt">></span> <span class="nt"><fieldset</span> <span class="na">hidden=</span><span class="s">"true"</span> <span class="na">repeat=</span><span class="s">"true"</span><span class="nt">></span> <span class="nt"><field</span> <span class="na">name=</span><span class="s">"test_color"</span> <span class="na">type=</span><span class="s">"color"</span> <span class="na">default=</span><span class="s">"#eee"</span> <span class="na">label=</span><span class="s">"color"</span> <span class="na">description=</span><span class="s">"test_color"</span> <span class="nt">/></span> <span class="nt"><field</span> <span class="na">name=</span><span class="s">"test_tag"</span> <span class="na">type=</span><span class="s">"tag"</span> <span class="na">label=</span><span class="s">"JTAG"</span> <span class="na">description=</span><span class="s">"test_tag"</span> <span class="na">mode=</span><span class="s">"nested"</span> <span class="na">multiple=</span><span class="s">"true"</span> <span class="nt">/></span> <span class="nt"><field</span> <span class="na">name=</span><span class="s">"test_list"</span> <span class="na">type=</span><span class="s">"list"</span> <span class="na">default=</span><span class="s">"1"</span> <span class="na">label=</span><span class="s">"test_list"</span> <span class="na">description=</span><span class="s">"test_list"</span> <span class="nt">></span> <span class="nt"><option</span> <span class="na">value=</span><span class="s">"1"</span><span class="nt">></span>JYES<span class="nt"></option></span> <span class="nt"><option</span> <span class="na">value=</span><span class="s">"0"</span><span class="nt">></span>JNO<span class="nt"></option></span> <span class="nt"></field></span> <span class="nt"><field</span> <span class="na">name=</span><span class="s">"test_text"</span> <span class="na">type=</span><span class="s">"text"</span> <span class="na">label=</span><span class="s">"test_text"</span> <span class="na">description=</span><span class="s">"test_text"</span> <span class="nt">/></span> <span class="nt"><field</span> <span class="na">name=</span><span class="s">"test_textarea"</span> <span class="na">type=</span><span class="s">"textarea"</span> <span class="na">label=</span><span class="s">"textarea"</span> <span class="na">width=</span><span class="s">"100"</span> <span class="nt">/></span> <span class="nt"><field</span> <span class="na">name=</span><span class="s">"test_radio"</span> <span class="na">default=</span><span class="s">"0"</span> <span class="na">type=</span><span class="s">"radio"</span> <span class="na">label=</span><span class="s">"test_radio"</span> <span class="na">description=</span><span class="s">"test_radio"</span><span class="nt">></span> <span class="nt"><option</span> <span class="na">value=</span><span class="s">"1"</span><span class="nt">></span>JYES<span class="nt"></option></span> <span class="nt"><option</span> <span class="na">value=</span><span class="s">"0"</span><span class="nt">></span>JNO<span class="nt"></option></span> <span class="nt"></field></span> <span class="nt"><field</span> <span class="na">name=</span><span class="s">"test_checkbox1"</span> <span class="na">type=</span><span class="s">"checkbox"</span> <span class="na">label=</span><span class="s">"checkbox1"</span> <span class="na">description=</span><span class="s">"test_checkbox1"</span> <span class="nt">/></span> <span class="nt"><field</span> <span class="na">name=</span><span class="s">"test_checkboxes"</span> <span class="na">type=</span><span class="s">"checkboxes"</span> <span class="na">label=</span><span class="s">"checkboxes"</span> <span class="na">description=</span><span class="s">"test_checkboxes"</span> <span class="nt">></span> <span class="nt"><option</span> <span class="na">value=</span><span class="s">"a"</span><span class="nt">></span>A<span class="nt"></option></span> <span class="nt"><option</span> <span class="na">value=</span><span class="s">"b"</span><span class="nt">></span>B<span class="nt"></option></span> <span class="nt"><option</span> <span class="na">value=</span><span class="s">"c"</span><span class="nt">></span>C<span class="nt"></option></span> <span class="nt"><option</span> <span class="na">value=</span><span class="s">"d"</span><span class="nt">></span>D<span class="nt"></option></span> <span class="nt"></field></span> <span class="nt"><field</span> <span class="na">name=</span><span class="s">"test_media"</span> <span class="na">type=</span><span class="s">"media"</span> <span class="na">directory=</span><span class="s">""</span> <span class="na">label=</span><span class="s">"media"</span> <span class="na">description=</span><span class="s">"test_media"</span><span class="nt">/></span> <span class="nt"></fieldset></span> <span class="nt"></field></span> </pre></div> <p>And of course can be used existing, if someone already have.</p> <p>Who brave enough to make a test? <img class="emoji" title=":smirk:" alt=":smirk:" src="https://github.global.ssl.fastly.net/images/icons/emoji/smirk.png" height="20" width="20" align="absmiddle"></p> |
Labels |
Added:
?
?
|
ok, so hope size problem now fixed,
also "cancel" button added,
please try test again
Hm, on safari and firefox (both cleared cache and tmp files) the admin-backend looks like this now:
http://d.pr/i/7YYa
http://d.pr/i/n3FK
The top-menu is missing...
But the size-problem is fixed now :-)
Hi. We have tested the repeatable and it dosent work on modules. It seems like it might work when you allready have added data, but if its empty it dosent work.
I have tested some more. And repeatable dosen work if it dosent have any data.
@christianostrem thanks for testing,
I will check again, looks like I broke something in last commits, because sure that I tested it with empty value
I just checked and all works good, even with empty value,
@christianostrem have a more details, what exactly not works, maybe some errors in the browser console?
also I cannot reproduce the problem that @Ehrenwert told, @Ehrenwert have a more details, what you did for it?
I know what the problem is. It has to do with backward compability. The old way of creating the xml for the repeatable dosent work when the values are empty.
I change my xml to the code you have written and it works. Btw the code you have written is much better :)
hmm, I tried make it b/c,
can you provide your "old" xml for repeatable? so I can try check more :)
<field name="related_links" type="Repeatable" icon="list" description="" label="Related links" default="{'related_url_internal':[''],'related_url_external':[''],'related_url_external_title':['']}">
<fields name="params">
<fieldset hidden="true" name="related_links_modal" label="Links" repeat="true">
<field name="related_url_internal" type="menuitem" default="45" label="Select a internal menu item" description="" />
<field name="related_url_external" type="text" default="" label="Enter external URL" description="" size="10" />
<field name="related_url_title" type="text" default="" label="Enter external URL title" description="" size="10" />
</fieldset>
</fields>
</field>
@christianostrem it not because empty, it because default value {'related_url_internal':[''],'related_url_external':[''],'related_url_external_title':['']}
is not valid JSON string, that used in old version.
In the old version it works because used JSON.decode
, that related to moototls, that use eval
for JSON parsing
complicated
now should be good, please try again
@Ehrenwert maybe you missed some file? ;)
"Travis" test for php 5.4 crashes on javascript?
Works :)
Using the editor field type and radio with class="btn-group" don't work.
Thanks for testing
sure, it will not work
currently Joomla! have no api for interaction between scripts, so no simple way make "repeatable" editor works ;)
and with the radio with class="btn-group" same problem - it by admin template script (if I understand you right)
Also this means that any field that have additional javascript logic will not work well.
If not count these, all else works good for you?
@Fedik thank you very much for great job!
But yes it's possible to include javascript logic for some field inside repeatable form, or include custom css or js file, or custom form field type.
Eg. in one my module with repeatable form I have included custom css in this way:
<fieldset hidden="true" repeat="true" addfieldpath="/modules/mod_mymodule/models/fields">
<field hidden="true" type="style"/>
like it is one of our form fields// style.php
defined('_JEXEC') or die('Restricted access');
jimport('joomla.form.formfield');
$document = JFactory::getDocument();
$document->addStyleSheet(JURI::root(true) .'/modules/mod_mymodule/css/mystyle.css' );
class JFormFieldStyle extends JFormField {
protected $type = 'style';
public function getInput() {
return;
}
}
Also here is some image where style.css helped me to create smaller form.
Completly the same procedure is to call real custom form field type:
eg. this is some "switcher" field
//switcher.php
jimport('joomla.form.formfield');
$document = JFactory::getDocument();
$document->addScript(JURI::root(true) .'/modules/mod_mymodule/js/mymodule.js');
class JFormFieldSwitcher extends JFormField {
protected $type = 'switcher';
public function getInput() {
return '<select id="'.$this->id.'" name="'.$this->name.'">'.
'<option value="1" >By Menu</option>'.
'<option value="2" >To Article</option>'.
'<option value="3" >Paste URL</option>'.
'</select>';
}
}
After it call it inside repeatable form:
<field one../>
<field two.../>
<field name="switcher" type="switcher" label="Link Type" description="" />
<field four../>
Best regards and thanks!
Sasha
@Fedik Fedik,
This is AWESOME!!! thanks!!! 2 comments:
@wilsonge
1. this should be good here, but not sure that I right understand the problem
2. for me more logical it add the new record at the end of the table :)
question, there another pull joomla-projects/cms-naked#53 , same as this but with layout support, how better to do: close a current pull , and use newest or?
RE: 1. It's definitely not. Apply your patch and #3147 and look at the form field and where the modal opens. It's a fairly big bug
I'd do this first - let's get the form field working. Then we can improve the form fields with JLayouts in the other repo at a later point. Me and Roberto need to focus on that again soon
Thanks for the screenshots :) was going to do that this evening!
On 28 July 2014 17:12, Peter Lose notifications@github.com wrote:
@Fedik https://github.com/Fedik regadring #3147
#3147 - The modal opens in the
top, forcing scroll on the user to see the repeatable field[image: skrmbillede-2014-07-28-kl -18 09 02]
https://cloud.githubusercontent.com/assets/1738811/3723275/c1f8fb36-1671-11e4-8c32-36a460a3e11f.jpg—
Reply to this email directly or view it on GitHub
#3574 (comment).
hm, strange,
but ok, I will try check after return from vacation
Tested this in my own template with Joomla 3.3.3. Works better and this bugs are gone:
Labels |
Removed:
?
|
Looks awesome. You can see travis is failing because of code style now :P You just need to go fix that and I think this can be merged in!
done
should we mark this as RTC?
It's possible implement "Drag and Drop" reorder to this - like Joomla?
Status | New | ⇒ | Ready to Commit |
Status | Ready to Commit | ⇒ | New |
Labels |
Added:
?
|
Merged into the 3.4-dev
branch. Thanks!
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2014-08-31 18:46:18 |
I needed to process repeated textareas containing raw data (html). So simply applying filter="raw" to the textarea field did not work, as the value gets wrapped into the hidden data container.
After some investigation I found applying the filter="raw" to the Repeatable element did the trick.
I have also tried to append the filter to the Repeatable element during the process of creating the attached fields, but without luck...
From my opinion, the Repeatable element should inherit the filter from its children for a more convenient use.
Hello I have modified the core code for : repeatable.php and repeatable.js
This script works for me :
corected bugs of former version :
-> it was not possible to have many JFormFieldRepeatable into a same form
-> the list was incremented unexpectly when clicking on "save" and re-opening
additionnal fieldType :
-> modal field (like JFieldUser...) can be added
-> chozen select works
todo :
-> no validation for the repeated fields, (no time for the moment)
I have modified the code because I really need modals, and "chosen" selects. Surelly the code must be perfectible, but for me this is the way to have something working.
I hope this help somebody : Your text to link here...
best regards
Philippe
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/3574.
FEDIK Please Help me man please...I have problem with field type media in repeatable..when i use this i choose for example one pic when i want to save or cancell that page doesnt do anything..how can i fixed that its make me old plaeas help me
@motamedimasoud Could you provide your xml code?
@motamedimasoud do backup of your site, then download and replace to new files:
libraries/joomla/form/fields/repeatable.php
media/system/js/repeatable.js
media/system/js/repeatable-uncompressed.js
in theory should help
FEDIK THANK U ALOT I LOVE U SO MUCHHHHHHHHHHHHHHHHH IT WORKED THANK U I WANT TO KEEP IN TOUCH WITH U PLEASE GIVE ME YOURM EMAIL ADDRESS I NEED U MY EMAIL ADDRESS IS MOTAMEDI_MASOUD@YAHOO.COM PLZ SEND ME AN EMAIL THANK U AGAIN MAN
The format of the JSON stored from a repeatable seems counter intuitive. Take for example:
It stores the following JSON string.
{
"title":
["Beach","Mountains"],
"caption":
["Sun","Snow"],
"link":
["Home","Home"],
"image":
["beach.jpg","mountains.jpg"]
}
That data structure isn't representative of the input from the user.
A structure similar to the one below is a better representation. Each value is associated with a row in the repeatable, and is also more friendly to decoding into an array for iterative purposes.
"0":
{
"title": "Beach",
"caption": "Sun",
"link": "Home",
"image": "beach.jpg"
},
"1":
{
"title": "Mountains",
"caption": "Snow",
"link": "Home",
"image": "mountains.jpg"
}
Hello for all.
I respect all your hard works with Joomla repeatable form fields, but I use different approach to get same things (no other popups inside main popup etc...)...
More about my Multipler module at: http://olsa.me/joomla-extensions/3-repeatable-section-module
Sorry @Fedik because I write about it here, but if it is interesting I will create repository for that.
Thanks and regards for all.
Milestone |
Added: |
@jrseliga I agree with this - the problem is that we just can't do this for the form field anymore because of b/c. Users who are using this field (yes there are some poor poor people who tried it before this patch) now expect the current data structure. And it's not even like we can find all the database tables currently using this structure and alter them either.... :( It would need a 'new' form field.
@wilsonge I don't know the process of deprecating code, it seems to me that it would be wise to create that "new" form field (repeatable2 or something) that addresses this issue. Mark the current as deprecated and remove it for a future 3.x or the 4.0 release. I would argue that the current JSON format approaches unusable, if nothing else it requires some ugly code once decoded into "usable" PHP arrays.
It may not require a new field type. Maybe you just need an attribute in the on the <field>
tag to specify which format you want to save as.
Hi. We can test it. We have code that allready uses repeatable.