Doesn't work "Go back" after "Copy" from list--record-edit(form view)

"Go back" is going back one step to where it is coming from (history).
"Save as copy" is staying on the (new) form (similar to "Apply") and "go back" is going back one step to the original form, that's exactly what is to expect.

If you want to go back to the list on "Save as copy" add a redirect plugin.
If you want to have a button to go back to list from anywhere you have to add your own one (button element with custom link or custom form template).
 
OK,
But there is no fabrik-form-plugin: "Button".

I try to use element-plugin: "button" and write "action" after "click" - it is something similar to this what i need, this works, but:
1. can you check my java-script code:
Code:
window.location.replace('http://candc.katowice.pl/index.php/menu-karta-produkcji/adm-rejestr-kart-produkcji');
i am not good in java-script coding and don't know if this is the best for this action:
--- i need something like "button: Go back" after clicking 15 or 20 or other number "button: Copy" - need "Go back to my list1".

2. Is any way to place "button: Go back to list1 after copying" in line with others buttons like: Save, Apply, Copy,...
I use my own form template "form-table1" that i have made from default fabrik template.
 

Attachments

  • Zaznaczenie_017.png
    Zaznaczenie_017.png
    101.5 KB · Views: 347
  • Zaznaczenie_018.png
    Zaznaczenie_018.png
    102.1 KB · Views: 367
  • Zaznaczenie_019.png
    Zaznaczenie_019.png
    274.4 KB · Views: 353
  • Zaznaczenie_020.png
    Zaznaczenie_020.png
    376.2 KB · Views: 335
  • Zaznaczenie_021.png
    Zaznaczenie_021.png
    384.7 KB · Views: 346
I think if you have a custom form template the easiest way is to edit default.php and replace $form->gobackButton , around line 155, something like
$mygobackButton = '<input type="button" value="Go back" onclick="parent.location=' . " 'http://candc.katowice.pl/index.php/menu-karta-produkcji/adm-rejestr-kart-produkcji' " . ' name="Goback" class="btn button">';
<?php echo $form->copyButton . ' ' . $mygobackButton . ' ' . $form->deleteButton . ' ' . $this->message ?>
 
oh, missing ". It must be
Code:
$mygobackButton = '<input type="button" value="Go back" onclick="parent.location=' . " 'http://candc.katowice.pl/index.php/menu-karta-produkcji/adm-rejestr-kart-produkcji' " . ' " name="Goback" class="btn button">';
 
Hi troester,

I put your code to my own form-template "form-table1" and this works very nice!
This is just what i need.
Many thanks. :)
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top