1. Fabrik 3.9 has been released. If you have updated Joomla to 3.9, this is a required update.
    Dismiss Notice

Can this be done

Discussion in 'Community' started by rbuelund, Nov 15, 2019.

  1. rbuelund

    rbuelund Member

    Level: Community
    I have a list that contains certain Category names. A list that contains items data.

    When I want to submit a new category i need to be able to add items dynamically with an "Add" button on the same Category form - so like a dynamic form in another form - is this possible ?
     
  2. lousyfool

    lousyfool Active Member

    Level: Community
  3. rbuelund

    rbuelund Member

    Level: Community
    Ahh.. I think i wrote it wrong. The flow i want is: add a New caregory throgh a form and on that same form dynamically add rows to another list which then also are joined to that exact caregory. So not only one dynamic element, but a list with many elements that you then can add dynamically to the caregory. Is that possible?
     
  4. lousyfool

    lousyfool Active Member

    Level: Community
  5. rbuelund

    rbuelund Member

    Level: Community
    Well.. still not quite what I want. An example: In a form I want to enter some general information about a brood(I think that is the english term?) of cats (eg brood name, mothers name and fathers name), then press "Add", and add information (name, birthdate, price etc..) about each kitten of the brood - so several rows of data for each kitten in this exact brood.. is that possible to do ?

    I do not want to create the brood first and then afterwards sellect it on each kitten, it must be one single process for the user.
     
    Last edited: Nov 15, 2019
  6. lousyfool

    lousyfool Active Member

    Level: Community
    Hmm, let's see... a group of elements which can be repeated... rings a bell? Oh right, repeatable groups. See Wiki. :)
     
  7. rbuelund

    rbuelund Member

    Level: Community
    Hmm.. but what is the difference between joining two lists and selecteing repeatable on one of the lists and creating repeatable groups ??
     
  8. lousyfool

    lousyfool Active Member

    Level: Community
  9. rbuelund

    rbuelund Member

    Level: Community
    Ok I managed to get it working with help from this post: http://fabrikar.com/forums/index.php?threads/fabrik-repeatable-group.34936/ - did not know that i had to delete the primary id of the list to set its group to repeatable. But now I have another problem. The form does not render the fields correctly, their name are shown instead of labels and eg fileupload fields are now just shown as a textbox ???
     

    Attached Files:

  10. startpoint

    startpoint Active Member

    Level: Community
    You need to change elements type on your joined list. By default is field or textarea.
     
  11. rbuelund

    rbuelund Member

    Level: Community
    No, the billede1 element IS allready of type fileupload !
     

    Attached Files:

  12. rbuelund

    rbuelund Member

    Level: Community
    Hmmm.. well the original elements where of the correct type, but when selecting Repeat, all of a sudden they are changed ?? But I will then have to recreate them.
     
  13. troester

    troester Well-Known Member Staff Member

    Level: Community
    NO!! You must not delete your PK (id element).
    You must create an additional group, set this group to repeatable and move all elements you want to repeat inside this group. But at least the id element of your list must stay in a standard non-repeatable group.

    BTW: technically there's no difference between a list join set to repeatable and a repeatable group. With the list join you are using an existing table with a FK linked to the id of your main/parent table, with the repeatable group Fabrik is creating and joining such a table for you (your-table_groupID_repeat, with parent_id as FK)
     
  14. rbuelund

    rbuelund Member

    Level: Community
    Ok - I've gotten it all to work now.. maybe a bit more info on the wiki about this would be helpfull for others.
     
  15. rbuelund

    rbuelund Member

    Level: Community
    But now I have another problem. When i add an image through the fileupload element in the first repeat, and then press + to add another repeat, that image is automatically add in that row too ?? "Copy values" on the group is set to NO ??
     
  16. rbuelund

    rbuelund Member

    Level: Community
    Also if i afterwards delete only one of the repeated rows - both rows and the parent row are removed ??
     
    Last edited: Nov 29, 2019
  17. troester

    troester Well-Known Member Staff Member

    Level: Community
    I think you can't use ajax upload (which is some sort of repeat group itself) inside a repeat group.
     
  18. rbuelund

    rbuelund Member

    Level: Community
    So crop of an image is not an option when you use repeatable ? That is not good !...
     
  19. rbuelund

    rbuelund Member

    Level: Community
    I only need to be able to upload one image per element, but I need the crop function on each image..
     
  20. rbuelund

    rbuelund Member

    Level: Community
    So this was impossible ?? Repeating groups with fileupload elements and image crop posibility ?
     

Share This Page