• Hello Fabrik Community

    Fabrik is now in the hands of the development team that brought you Fabrik for Joomla 4. We have recently transitioned the Fabrik site over to a new server and are busy trying to clean it up. We have upgraded the site to Joomla 4 and are running the latest version of Fabrik 4. We have also upgraded the Xenforo forum software to the latest version. Many of the widgets you might have been used to on the forum are no longer operational, many abandoned by the developers. We hope to bring back some of the important ones as we have time.

    Exciting times to be sure.

    The Fabrik 4.0 Official release is now available. In addition, the Fabrik codebase is now available in a public repository. See the notices about these in the announcements section

    We wish to shout out a very big Thank You to all of you who have made donations. They have really helped. But we can always use more...wink..wink..

    Also a big Thank You to those of you who have been assisting others in the forum. This takes a very big burden off of us as we work on bugs, the website and the future of Fabrik.

Repeated group issue

procajlok

Member
Hello!
I have 3 group, second is repeated group (data for group participants for the trip). Second and third group is on other pages (multi pages form on list and form).
In first group i have field where customer define how many people are going. Its define how many repeat is group on next page. I define this field in option in repeated group in "Repeat num Element".
> When this field is 1 or null (empty) i can go to next page with repeated group.
> When field is 0 or other value i cant go to next page! :(

What's the problem?

EDIT: Attach the screenshot from Firefox debug console, when i try go to next page.
 

Attachments

  • Screen Shot 11-19-17 at 12.18 PM.PNG
    Screen Shot 11-19-17 at 12.18 PM.PNG
    15 KB · Views: 44
Last edited:
Hmm, its dev system, i dont have backup. Maybe tomorrow I'll ask host provider (home.pl) for backup MySQL.. - it's enough, or i must recover FTP too ?
 
Just the database.

If you install Akeeba, I'll make a backup before I start testing again, so I can recover from any cockups.

-- hugh
 
Any ideas? Its blocked further work on project :( And i see - when i fill the field (gr_iloscOs) with a large number (ex. 80), browser has stopped and hangs...
And btw I ask - any possible to take this repeat group like friendly table with scrollbar, where every repeat is a row? :)
 
I'm probably going to need to get an Akeeba image and set the site up here, as I can't see why this is happening. It won't even submit with multiple copies of the group with multi page turned off.

And yes, huge numbers of repeats will hang the browser. HTML just wasn't designed to have that many form inputs. That isn't a Fabrik thing, it's a browser / HTML thing.

For repeats as rows, edit group settings and set the layout to "table" instead of "list".

-- hugh
 
Ok, I can even pay extra just to get it done :D hehe...
But the moment - now HTML create as many repetitions group if you typed in the field. And can we allow manual repeating of groups with the + button but limited to the number given in the field? May it simplify the code that is performed when validating a field with the number of repetitions?
 
OK, I think I've fixed it. I don't know how, but somehow your joined group elements weren't associated with the form. It's almost like you created a repeat group, then deleted it, and added the repeat group back as a list join by hand, or something.

So when trying to submit, it was getting weird duplicate PK errors.

Anyway, I deleted the join, recreated it, and reset it as a repeat, and now you have the correct structure.

I've left it with multi page turned off for now, you can re-enable that.

-- hugh
 
When I adjusted the database fields, the problem again occurred. But - i see where is the problem! Problem occured when i add PHP validation to field os_PESEL.
Will you be so good and check what the problem may be?
 
Ah, OK. It's because you declared a function in your PHP. So it'll work with one repeat, but as soon as you have more than one, so your validation code runs more than once, the function already exists, and trying to define a function that already exists is a fatal error. I don't know why your system isn't reporting errors, which would have made this a lot easier to debug. I enabled error reporting in J!, but it's not showing errors.

The simple fix is to wrap a function_exists() test around your function definition ...

Code:
if (!function_exists('validatepesel'))
{
    function validatepesel($data)
    {
        // blah blah
    }
}

return validatepesel($data);

So it won't try and redefine the function if it already exists.

The less simple, but typically better approach is not define functions inline like that, but put them in a file somewhere, and use require_once() to include them ...

Code:
require_once(JPATH_ROOT . '/path/to/my_functions.php';
return validatepesel($data);

In general, when reporting problems, let us know if you have any custom code involved in the form, as that's most often where the problem will be with unexpected white pages.

-- hugh
 
Hello!! Nice to come back to you again ;)
Can You check why when i fill repeat group, field "parent_id" is not being filled? I would not like to re-modify the entire database ... :(
 
If it's the one on the Zgloszenia form, then it's probably because you've unpublished the parent_id element.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top