cheyennemtnman
Member
Can you use the same form to display a record of the fields just submitted by a form? Same form but populated with data after selecting a drop down element for record selection is what I have in mind.... Possible?
We have now opened a commercial services section here on the forum for registered users. If you have a Fabrik project that you wish to have someone work on for you, post it under Help Wanted. If you are an application developer and wish to earn some money helping others, post your details under Fabrik Application Developers.
Both of these are unmoderated. It will be up to both parties to work out the details and come to an agreement.
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
Think he means, that you have a db join dropdown with a list of possible records, selecting an entry from the dropdown would load the record into the form.
It might be possible although its not something I have ever tried, with the autofill form plugin. However, you may need to write some custom js to update the forms hidden 'rowid' field with the selected value in the dropdown, otherwise upon submit you would most likely create a new record and not update the selected record
Hmm no not really. You could redirect to a list view prefiltered on the users records. That would presume that the user was logged in when creating records.Okay I like those two options... but to actually be able to pull up a record to edit after noting an error later can that be done using a dropdown element showing the records they have submitted and they could select a record to edit from that list?
If you have a redirect in the form already does that mean you have to delete that plugin and put in the confirmation plugin first then the redirect plugin?
<?php
/**
* @package Joomla
* @subpackage Fabrik
* @copyright Copyright (C) 2005 Fabrik. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*/
// No direct access
defined('_JEXEC') or die;
if ($this->tablePicker != '') : ?>
<div style="text-align:right"><?php echo JText::_('COM_FABRIK_LIST') ?>: <?php echo $this->tablePicker; ?></div>
<?php
endif;
if ($this->getModel()->getParams()->get('show-title', 1)) :?>
<h1><?php echo $this->table->label;?></h1>
<?php endif;?>
<?php echo $this->table->intro;?>
<form class="fabrikForm" action="<?php echo $this->table->action;?>" method="post" id="<?php echo $this->formid;?>" name="fabrikList">
<?php echo $this->loadTemplate('buttons');
if ($this->showFilters) :
echo $this->loadTemplate('filter');
endif;
?>
<div class="fabrikDataContainer">
<?php foreach ($this->pluginBeforeList as $c) :
echo $c;
endforeach;?>
<select class="fabrikList" id="list_<?php echo $this->table->renderid;?>">
<?php
foreach ($this->rows as $groupedby => $group) :
foreach ($group as $row) :
echo '<option value="' . $row->data->__pk_val . '">' . $row->data->element_test___user . '</option>';
endforeach;
endforeach;?>
</select>
<?php print_r($this->hiddenFields);?>
</form>
<?php echo $this->table->outro;?>
<script type="text/javascript">
window.addEvent('domready', function () {
var select = document.id('list_<?php echo $this->table->renderid;?>');
select.addEvent('change', function (e) {
var v = select.get('value')
window.location.href = 'index.php?option=com_fabrik&view=form&formid=1&rowid=' + v;
});
});
</script>
<select class="fabrikList" id="list_<?php echo $this->table->renderid;?>">
<?php
foreach ($this->rows as $groupedby => $group) :
foreach ($group as $row) :
echo '<option value="' . $row->data->__pk_val . '">' . $row->data->element_test___user . '</option>';
endforeach;
endforeach;?>
</select>
<script type="text/javascript">
window.addEvent('domready', function () {
var select = document.id('list_<?php echo $this->table->renderid;?>');
select.addEvent('change', function (e) {
var v = select.get('value')
window.location.href = 'index.php?option=com_fabrik&view=form&formid=1&rowid=' + v;
});
});
</script>