How to start a new record with empty repeat group?

Status
Not open for further replies.

troester

Administrator
Staff member
It's no problem in an existing or new record to delete all repeat group entries and save (so getting "no data" on the next edit and adding repeat group entries again).

But how can I start a new record with "no data" repeat group?
Setting "Repeat min"=0 doesn't do.
The repeatable group is a left join, so having it empty is valid.
 
Hmm. Looks like you can't in 3.0, without a code change.

You could probably do it with a few lines of custom JS on the form, would that work for ya?

-- hugh
 
Ok.
So how to delete the repeat group? (my JS skills are limited).
Hide won't help because this won't prevent the creation of a new entry in the joined table.

BTW:
I can hide a group with element's build in JS but did't find the condition to hide if it's a new record.
on load hide xxx when this ==0 (on id element) isn't working (it seems id is not 0 but empty)
 
Hmmm, I just tried what I thought should do it, but it runs in to an issue with code that handles 'last displayed group'. Will have to dig in to this one some more.

-- hugh
 
OK, I've committed what should be a fix so you can set the group's "Repeat Min" to 0, and it'll just show the usual "empty data" msg, with no group actually showing.
 
Seems this is gone in one of the latest updates.
Commit was in 72d183643a0d4d5a8563bb7caf12c5f6be67a529 (2013-07-15)

Now I get an JS message
form: watchgroup buttons - didnt find form
Which is created in ....\media\com_fabrik\js\form.js line 1248
 
Some more testing is showing that the reason is a dbjoin element with frontend add option which is breaking tooltips and repeat group min 0 in this form.
But I can't replicate this on my test site, too.

So I'm disabeling this frontend add as a workaround (hoping nobody has used this option until now).
Thanks for testing.
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top