Does anybody ever noticed that Back button and Next button are inverted in term of position ?
Next is on the left and Back on the right ?
Is there any possibility to invert this : put Next on the right and Back on the left, which would be more logical....
Next is on the left and Back on the right ?
Is there any possibility to invert this : put Next on the right and Back on the left, which would be more logical....
Hi laurentmartin,
You could probably do something with JavaScript and/or CSS to shift the locations. A quick and dirty fix wodul be to hack the ChronoForms code at around line 323 of /administrator/components/com_chronoforms/helpers/html_helper.php
Bob
You could probably do something with JavaScript and/or CSS to shift the locations. A quick and dirty fix wodul be to hack the ChronoForms code at around line 323 of /administrator/components/com_chronoforms/helpers/html_helper.php
if(isset($tag['reset_button']) && (bool)$tag['reset_button'] === true){
$output .= " <input type='reset' name='reset' value='".$tag['reset_button_value']."' />";
}
if(isset($tag['back_button']) && (bool)$tag['back_button'] === true){
$output .= " <input type='button' name='back' value='".$tag['back_button_value']."' onclick='history.back()' />";
}
You'd need to swap over the two 'if' blocks.Bob
I tried your suggestion but it didn't work.
Do you have any thing else to propose or any other location to look at.
I am very amazed this never get attention to anyhbpdy that both button were inverted !
Do you have any thing else to propose or any other location to look at.
I am very amazed this never get attention to anyhbpdy that both button were inverted !
Hi bob
I indeed found those line in the code but I have no idea how to modify it a I dot see any tag related to next button .
Can your clarify a bit ?
Thanks for your great support by the way.
I am amazed to see how chronoform is developing years after years in an open source way.
I will be glad to purchase license I think to finish our project.
Regards
I indeed found those line in the code but I have no idea how to modify it a I dot see any tag related to next button .
Can your clarify a bit ?
Thanks for your great support by the way.
I am amazed to see how chronoform is developing years after years in an open source way.
I will be glad to purchase license I think to finish our project.
Regards
Hi laurentmartin,
I'm sorry I thought that you meant the Reset and Back buttons. Where are the Next and Back buttons you are asking about exactly.
Bob
I'm sorry I thought that you meant the Reset and Back buttons. Where are the Next and Back buttons you are asking about exactly.
Bob
Hi Bob,
The button are in the bottom of my form which is a multi page stuff.
So I need to go from one form to another one from left to right...
When i tick the Back stuff in the option of the Submit, it diplay the Back button on the right and the Submit (that I called Next) on the left.
I need to invert this because my form are in English , not in Arabic...
The button are in the bottom of my form which is a multi page stuff.
So I need to go from one form to another one from left to right...
When i tick the Back stuff in the option of the Submit, it diplay the Back button on the right and the Submit (that I called Next) on the left.
I need to invert this because my form are in English , not in Arabic...
Hi laurentmartin,
It's the same block of code that you need to edit if you want to hack the code code for this. Here's the whole block from around line 305 of /administrator/components/com_chronoforms/helpers/html_helper.php:
OR you can give the submit button an ID of 'submit_btn' and then use this CSS in a Load CSS action in the form On Load event:
Bob
It's the same block of code that you need to edit if you want to hack the code code for this. Here's the whole block from around line 305 of /administrator/components/com_chronoforms/helpers/html_helper.php:
case 'submit':
unset($fieldoptions['value']);
// start submit button . . .
$output .= '<input';
if(isset($tag['button_type'])){
$tag['type'] = $tag['button_type'];
unset($tag['button_type']);
}
if(isset($tag['button_align'])){
$divContainer['style'][] = 'text-align:'.$tag['button_align'];
unset($tag['button_align']);
}
foreach($tag as $k => $v){
if(in_array($k, array('reset_button', 'reset_button_value', 'back_button', 'back_button_value'))){
continue;
}
$output .= ' '.$k.'="'.$v.'"';
}
$output .= ' />'."\n";
// . . . end submit button
// start reset button . . .
if(isset($tag['reset_button']) && (bool)$tag['reset_button'] === true){
$output .= " <input type='reset' name='reset' value='".$tag['reset_button_value']."' />";
}
// . . . end reset button
// start back button . . .
if(isset($tag['back_button']) && (bool)$tag['back_button'] === true){
$output .= " <input type='button' name='back' value='".$tag['back_button_value']."' onclick='history.back()' />";
}
// . . . end back button
unset($fieldoptions['label']);
break;
I've added comments to show where the code for each button starts and ends.OR you can give the submit button an ID of 'submit_btn' and then use this CSS in a Load CSS action in the form On Load event:
#submit_btn_container_div input[name=back] {
float: left;
margin-right: 6px;
}
Bob
HI Bob,
Thank you for your help and your time.
It did the trick. :-)
I think this is a small bug that should be in the checklist for future release.
Thank you for your help and your time.
It did the trick. :-)
I think this is a small bug that should be in the checklist for future release.
I have got the better perfect way to alter those buttons, may could be helpful to anyone. With the exact code below, will order the buttons as 'Previous', then 'Reset', then 'Next':
Though my Clear or Reset button doeasn't clear the data in the form. If anyone there, please help me, it will be appreciated.
Oh! The file has to edit is, /joomla/administrator/components/com_chronoforms/helpers/html_helper.php, the line is about 305th line. And each change in the file - has to go 'Form Wizard', then 'save & Close'.
Thanks.
Raihan
case 'submit':
unset($fieldoptions['value']);
// start back button . . .
if(isset($tag['back_button']) && (bool)$tag['back_button'] === true){ $output .= " <input type='button' name='back' value='".$tag['back_button_value']."' onclick='history.back()' />"; }
// . . . end back button
// start reset button . . .
if(isset($tag['reset_button']) && (bool)$tag['reset_button'] === true){ $output .= " <input type='reset' name='reset' value='".$tag['reset_button_value']."' />"; }
// . . . end reset button
// start submit button . . .
$output .= ' <input';
if(isset($tag['button_type'])){
$tag['type'] = $tag['button_type'];
unset($tag['button_type']);
}
if(isset($tag['button_align'])){
$divContainer['style'][] = 'text-align:'.$tag['button_align'];
unset($tag['button_align']);
}
foreach($tag as $k => $v){
if(in_array($k, array('reset_button', 'reset_button_value', 'back_button', 'back_button_value'))){ continue; }
$output .= ' '.$k.'="' .$v.'"';
}
$output .= ' />'."\n";
// . . . end submit button
unset($fieldoptions['label']);
Though my Clear or Reset button doeasn't clear the data in the form. If anyone there, please help me, it will be appreciated.
Oh! The file has to edit is, /joomla/administrator/components/com_chronoforms/helpers/html_helper.php, the line is about 305th line. And each change in the file - has to go 'Form Wizard', then 'save & Close'.
Thanks.
Raihan
This topic is locked and no more replies can be posted.