Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Autofilling fields from one module to antoher
#1
This one took me some time to figure out, and in the end it was dead-simple:

Let's say you want to create a module, of which the records can be created using an entry from another module as the starting point. So you create an action link in the source module's action column that includes the record ID from that source module in the query params.

Now you have a UI10 field in your new module that needs to be filled out with that record. Just edit "CreateView.php" in your new module and add:

PHP Code:
if (isset($_REQUEST['source_id']) && $_REQUEST[source_id'] != '') {
 $focus->column_fields['
your_module_column_name'] = $_REQUEST['source_id'];


Before the smarty BLOCKS are assigned. This will take care of the rest. The source_id is your query param, the columnname is the field/column name in your new module, where you want the link to take place.

Hope this helps someone.
Reply


Messages In This Thread
Autofilling fields from one module to antoher - Guido1982 - 10-09-2016, 04:23 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)