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

Article Update on Form Submission

Discussion in 'Community' started by dboggs1994, May 21, 2018.

  1. dboggs1994

    dboggs1994 New Member

    Level: Community
    I have the article creation plug-in installed, it is not 100% working, getting white screen after submission of the article. However the more concerning issue at this point is when an update is made a new article is created. If I just switch the plug-in to fire when a new record is inserted updates are not made. Is the creation of a new version of the article normal behavior when an update occurs? Can if be suppressed?
     
  2. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    No, it should edit the existing article when editing a form.

    Do you have the "Reference Element" set? And is there data in it? It should be a JSON string, mapping a category ID to an article ID, like ...

    {"123":"234"}

    -- hugh
     
  3. dboggs1994

    dboggs1994 New Member

    Level: Community
    Hi, sorry for my late response. I am not completely following you, JSON? I am using an Article Template to create the initial article. I have referenced the article id and specified a category for newly created records. Even selecting the correct article id and referencing that on submission creates a new JOOMLA article. Doing updates creates a new JOOMLA article. Editing an existing submission creates a new JOOMLA article.
     
  4. troester

    troester Well-Known Member Staff Member

    Level: Community
    Your form must have an element (field) which is used to store the article id and the category id (in JSON format, so the element content is looking like {"123":"234"} where 123=catID and 234 = articleID).

    This element has to be selected as "reference element" in the article plugin settings.
     
  5. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    Usually the Reference Element would be hidden, as it's just for internal use by Fabrik.

    -- hugh
     
  6. dboggs1994

    dboggs1994 New Member

    Level: Community
    Sorry I must be really thick headed here. Hugh, the Internal reference you mention is that the Internal ID field that is automatically generated? I have used the ID field as the reference element (hidden).
    I have a category field that I am using for the category reference, a database join field type, to bring the list of categories into a dropdown list (id is the value, titles are the labels). What am I missing?
     
  7. troester

    troester Well-Known Member Staff Member

    Level: Community
    No, the InternalID is the primary key of your Fabrik list.
    You need an extra field - the reference element - where Fabrik can store the infos (catID, articleID) the article plugin needs to work.
     
  8. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    As Troester says, create a new field element, called something like 'reference', set it to hidden, and designate that as the 'Reference Element' in the article plugin settings.

    -- hugh
     

Share This Page