Joomla 3.0 & Chronoforms load db based on cf_user_id - joomla

I have created a form using chronoforms v4 in joomla 3 and have created a table associated with the form. I am now trying to load the fields from gws_chronoforms_data_gateway_registration based on matching the db record cf_user_id to the current users id.
How would I go about this?

You can retrieve data from the database table via a ChronoForm with a "DB Record Loader" action in the "On Load" event. Add a WHERE statement under the Advanced tab with cf_id = whatever is relevant.
Add a Custom Code action to display the results like this:
<?php
echo "<div>" . $form->data['fieldname'] . "</div>";
?>
There's no need to add any form elements.
See the tutorial at http://www.chronoengine.com/faqs/tutorials/v4-tutorials/162-cfv4dbrecordloader.html for more details.

Related

Laravel Backpack Update Datatable via ajax when select field change

i am new to laravel backpack. I have a view where i have to show some details of a category, i have a dropdown list of categories on top and datatable below it listing all the details i want to update this data table when any category is selected and I want it use ajax so that it wont load the page again. I was unable to get any clue in the documents. Can someone point me to the correct way to implement this. Thank you in advance!
In Laravel backpack v4 as far I know you can use the variable crud and by calling this crud.table.draw()
You can see the file in datatables_logic.blade.php.
JQuery(document).ready(function($){
crud.table = $("#crudTable").DataTable(crud.dataTableConfiguration);
...
)}

Auto Populate ADF Form from ADF Table

I have an ADF table which has to populate a form after redirecting to a new page.
Basically I have to implement the Edit functionality for a record selected in the table.
I have made the following iterator bindings to the fields but am not sure of how the values will be fetched from the database. I am unable to debug the bindings as the page does not render when redirected to.
Here is a snippet of the pageDef created
<attributeValues id="sedol" IterBinding="findD1ByCaIdIter">
<AttrNames>
<Item Value="sedol"/>
</AttrNames>
</attributeValues>
Any help/tutorial/guide would be much appreciated
Hopefully you are using a data control. If so, then use the data control to populate the table. Make sure to turn on single row selection.
Then on the Edit page, add the same data control as a form. ADF's built-in row concurrency will set the selected table row to be the "current row" in the iterator and bound VO Rowset. Then, when the Edit page is displayed, it will retrieve the "current row" from the iterator and it should be the selected row from the table.
Since you seem to be new to ADF, I suggest you learn a bit more, here, here and you can try to google "oracle adf table and form edit" -> some ideas here, here, here.
Basic info like what is your data source (ADF BC or JPA) and are you familiar with ADF Data Controls and what version of ADF are you using are very helpful with questions like these.
Add a column in table in the end. drop on button (ADFfaces) and in its actionlistener add the following code:
public void editData() {
DCBindingContainer contxt = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
DCIteratorBinding iter = contxt.findIteratorBinding("TestView1Iterator");
ViewObject testVo = iter.getViewObject();
Row selectedRow = testVo.getCurrentRow();
}

Why is my Oracle APEX DML Form stuck in edit mode and not going back to create mode?

I have created a page based on "Form & Report" template. So there is the Report page on which there is the create button. That create button leads to the form page which contains.
It is pretty simple. I don't know if there is a cache memory not emptying itself or if there is a setting that I have not properly set.
When I want to create a new database record, Oracle Apex behaves as if I asked it to update a record (though it still presents me with empty text fields).
Below the image of what's happening.
Create button of the Report
Buttons for edit are shown when I click the create button
Those edit buttons are shown instead of the buttons below => This means that the Apex software is behaving like I asked to edit a record not to insert a record.
Why is this happening?
You need to take a look at your create button. Is it passing a value to the form? If so, you probably don't want that. Is it clearing the cache of the form? If not, you probably want to clear it.
Also, on the form page take a look at your processes.. specifically the Automated Row Fetch (ARF) process.. what's the primary key that this process is using?
Also, take a look at the conditions for each button on your form. For the delete/save buttons you likely want a condition type of "value of item / column in expression 1 Is NOT NULL".
For your create button you would want the opposite.. "value of item /... IS NULL".
In both cases for the expression 1 you'd want to use the item that your ARF is leveraging.
#Bloomberg58 if you used the wizard that should not have anyway try to validate the create button in report page and the server-side validation of create and save button in form page

Drupal 8 YAML Form Module: Populate Select Element

I'm a newbie in Drupal and I'm trying to create custom forms in Drupal 8 using 'YAML Form' module:
https://www.drupal.org/project/yamlform
I have added some 'select' elements with some custom options from the Form elements page provided by the module, but I don't find the way to populate these elements from database.
How can I do it? Step by step if possible, please.
Thanks in advance!
I don't know if it's the best way to do it but it works for me:
I've created a custom module and in the '.module' file I've implemented the hook hook_yamlform_options_YAMLFORM_OPTIONS_ID_alter() when the part YAMLFORM_OPTIONS_ID is the ID of a custom set of options I've added in the Options page (admin/structure/yamlform/settings/options/manage).
The code of the hook, basically, gets data from database and sets it in the $options array with the desired keys and values.
Then when I access to the Options page again, in the row of the new custom set of options, the column ALTERED has the value 'Yes'. Click to 'Edit' this row and then click to 'Reset' button. The result is that the options value/text table is updated automatically with the data returned from database.

how the submit action works in joomla?

I am new to joomla.
I have created a component using component creator. I've a form in admin side storing the details of a location, when the detail is saved I need to get the last insert id of this table to insert in another table with some extra details.
I would like to know how to get the inserted id and where the submit action goes.
Component folder in the Administrator includes all the components we use. view.html.php file includes the action to be done.
JToolBarHelper::save('yourcontrollername.save', 'JTOOLBAR_SAVE');
The save function calls the default save event. To include your custom action, define a save function in the controller.

Resources