custom form buttons stopped working for me on f 3.3

skyrun

Active Member
updated from f3.2 (about 6 mo old version) to f3.3 using svn and the buttons in my custom template stopped working. they're there, but nothing happens (including no js errors) when they are pressed now.

here is the code from the template:

PHP:
....
// add html for 2 new buttons
$form->submitnoassignbutton = "<input type=\"submit\" id=\"fabrikSubmitnoassign\" class=\"btn btn-primary button\" name=\"Submitnoassign\" value=\"Save, Do Not Assign\" />";
$form->submitnosave = "<input type=\"submit\" id=\"fabrikSubmitnosave\" class=\"btn btn-fail button\" name=\"Submitnosave\" value=\"Cancel: Release Lock, But Do Not Save Changes\" />";
 
if ($this->hasActions) : ?>
<div class="fabrikActions form-actions">
<div class="row-fluid">
  <div class="span4 btn-group">
  <?php
  echo $form->submitButton. ' ';
 
// place 2 new buttons  vvvv
  echo $form->submitnoassignbutton. ' ';
  echo $form->submitnosave. ' ';
// place 2 new buttons ^^^^
 
  echo $form->applyButton . ' ';
  echo $form->copyButton;
  ?>
  </div>
  <?php if ($form->gobackButton . $form->resetButton . $form->deleteButton !== '') : ?>
....
 
echo $form->submitnoassignbutton. ' ';
echo $form->submitnosave. ' ';
Did you have some custom modifications in Fabrik core code which may be overridden by the update? (I think "fabrikSubmitnosave" is no standard form action)
 
no core mods in my code, i process them with a php form plugin like:
PHP:
<?php
// BEFORE SAVING (onBeforeProcess)
// check if lead has be re-checked-out while you were waiting... (after 60 sec timeout)
$user = JFactory::getUser();
$userId = $user->id;
 
$noassignpressed = $_REQUEST[Submitnoassign];
$nosavepressed = $_REQUEST[Submitnosave];
 
 if ($nosavepressed) {
...etc...
?>

but it's not getting that far... the button markup doesn't work any longer on the newest update.
 
I assume the Fabrik bootstrap template has changed meanwhile, so your custom copy is not up-to-date.

The code created for the standard submit button is
<button class="btn btn-primary button save" name="Submit" type="submit">Save</button>

Try changing your button HTML from input to button.
 
changed two new buttons to be <buttons> and now they submit the form which is not surprising. however i can't read their value to in my form submission plugin, at least not the same way with $_REQUEST[Submitnoassign] etc.
 
You mentioned in Skype you had sorted out your button issues. Is that still the case, or is your last post subsequent to that, and you are still having issues?

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top