For running J!5.1 you must https://fabrikar.com/forums/index.php?wiki/update-from-github/ or include the new file manually https://fabrikar.com/forums/index.php?threads/joomla-5-1-and-fabrik-cannot-find-files-error.54473/post-285151 See also Announcements
Please see our announcement here.
Don't use $(). Use the Fabrik element object.
Fabrik.getBlock('form_X').formElements.get('yourtable___yourelement').getValue()
Replace X with your form's numeric ID, and the element full name.
Sent from my HTC6545LVW using Tapatalk
I tried it. But you didn't post the URL which is used to open the form. With the URL it is possible to see, if perhaps the id of the record to be loaded is wrong. If you do not want to post the URL here for security reasons only post the local part of it. If any personal information is in the URL (e. g. names) just depersonalise them. But there should be only record ids.
let url= 'index.php?option=com_fabrik'
+ '&view=form'
+ '&formid=123'
+ '&rowid=321' // <-- don't miss the rowid!
// it is the id of the record to load into the form
+ '&tmpl=component'
+ '&ajax=1' // <-- you missed this, too!
+ '&format=partial';
You can view the URL in the source code of the resulting HTML page. Just right click in your window and select "view source" (or similar) from the context menu. Look for your link.
cheesegrit wrote to use the URL with the following components:
but you missed the rowid in your code to form the URL. You must supply a rowid in the URL in order to let the record be loaded into the form.Code:let url= 'index.php?option=com_fabrik' + '&view=form' + '&formid=123' + '&rowid=321' // <-- don't miss the rowid! // it is the id of the record to load into the form + '&tmpl=component' + '&ajax=1' // <-- you missed this, too! + '&format=partial';
- Which error is raised?
- Does the error occur if you do not pass the idasessionurl parameter?
- Does the record with the rowid=3 exist?
- Is the record with the rowid=3 editable for you in the perspective of fabrik?
The rowid in the url tells the server side of fabrik to load a record out of the database and ask the client side to load it into the popped up form.tiagovareta said:What I intend is: "It is also possible to show popups with related data from inside a form."
The form does not "record records". It only displays a record, enabling the user to edit it. Do you want to create a new record which is related to the one displayed in the parent form?tiagovareta said:This form ... may not record the records, I just want to collect fields to then run a script in php ...
The rowid in the url tells the server side of fabrik to load a record out of the database and ask the client side to load it into the popped up form.
It is not clear what you mean with:
The form does not "record records". It only displays a record, enabling the user to edit it. Do you want to create a new record which is related to the one displayed in the parent form?
Or is the data you want to display in the form out of the same record and you want to divide the data into two forms? In the latter case may be you want to use a multi page form?
You still need rowid on a form view URL, even if it doesn't record in the database. Leaving it blank or using 0 should work. The form input is needed in the router code (the extension specific code that takes what is on the URL after option=com_foo, and figures out what task to run). And that happens long before the form specific code (that knows whether the form writes to the database or not) runs.
-- hugh