1. "Fabrik 4" helpers needed!

    You are invited to join other community members active in coding, maintaining and improving Fabrik. Please visit https://fabrik.help for more information!
    Dismiss Notice

Joined Repeatable list/form calc problems

Discussion in 'Bugs, Issues & Suggestions' started by APursch, May 26, 2023 at 10:24 AM.

Thread Status:
Not open for further replies.
  1. APursch

    APursch New Member

    Level: Community
    I've been running a particular Fabrik form in J3 for some years without issue, it's a simple sale entry with the sale detail - customer, order date etc in the main List/Form (t_sales) and the items ordered in a joined repeatable List (t_sale_items).
    The first screen print illustrates how it looks with some Calc fields settin the net price/unit and line totals
    [​IMG]
    I tried updating this to J4.3.1 F4G3 and had so many problems I decided to start from scratch but have run into a similar problem in the new build.
    Below you can see that the new build calculates fine in the first line of the repeat group but then fails - in fact it just takes the value from line 1 irrespective of the changed detail in subsequent lines. Further, as can be seen, it switches the first Yes/No field without input from the user. I'm seeing no warning or errors in the Consol or Network, etc. Any ideas please?
    [​IMG]
     
  2. APursch

    APursch New Member

    Level: Community
    Sorry had problem with images ... J3-Fab3.png J4.3.1-Fab4 G3.png
     
  3. APursch

    APursch New Member

    Level: Community
    Please bear with me, I should have mentioned that the calc fields all carry the same _0 suffix, whereas the other fields run _0, _1, _2 etc as they should.
     
  4. troester

    troester Well-Known Member Staff Member

    Level: Community
    Can you try:

    In plugins\fabrik_element\calc\layouts\fabrik-element-calc-form.php line 16
    add class fabrikinput
    so
    <div class="fabrikinput form-control-plaintext....
     
  5. troester

    troester Well-Known Member Staff Member

    Level: Community
    Should be fixed in the next release.
     
  6. APursch

    APursch New Member

    Level: Community
    That's great thank you, the calc is working again. :) However, I still have the first Yes/No field switching from default Yes to No on load, back to correct Yes in second repeat row and to No again for subsequent rows. Tried to work around with radio buttons, but that's irregular in a similar way too. :(
     
  7. troester

    troester Well-Known Member Staff Member

    Level: Community
    For YesNO:
    in plugins\fabrik_element\yesno\yesno.php
    add after line 318 ($displayData->class = implode(' ', $this->gridClasses()['label']);)
    $displayData->class .= ' fabrikinput ';
     
  8. APursch

    APursch New Member

    Level: Community
    Again thank you. Is there a fix for the radio buttons too which which repeat ok for the first repeat row but then ignore defaults in the third and subsequent repeats?
     
Thread Status:
Not open for further replies.

Share This Page