Hi,
ok. I can see, this is not the intended behavior. Actually it looks as if I missed to add the text, which you can set in the form configuration, at some code parts, therefore it is not always used.
To fix it, you have to make the following changes, which I will merge into the Visforms Subscription core.
Open the file components\com_visforms\lib\field\pagebreak.php (make a backup copy of the file first)
Add a new function to the class by adding the following code just before the last closing } of the file
Code:
protected function setBackBtnText()
{
$this->field->backbtntext = $this->form->backbtntext;
}
Replace the code
Code:
protected function setField()
{
$this->extractDefaultValueParams();
$this->setFieldDefaultValue();
$this->setCustomJs();
$this->setFieldsetCounter();
$this->addFormStep();
}
with
Code:
protected function setField()
{
$this->extractDefaultValueParams();
$this->setFieldDefaultValue();
$this->setCustomJs();
$this->setFieldsetCounter();
$this->addFormStep();
$this->setBackBtnText();
}
Save changes and close file
Further on you have to modify the layout files which create the button, too.
These files exist in the following path where LAYOUTNAME is
bt3default, bt3horizontal, bt3mcindividual, btdefault, default, edit, editbt3default,editbt3horizontal, editbt3mcindividual, editbtdefault, editmcindividual and mcindividual
If you do not use the frontend edit feature or bt3layouts, you can skip these path. Changes will come with the next subscription release.
Open the file components\com_visforms\layouts\visforms\LAYOUTNAME\pagebreak\control.php (make a backup copy of the file first)
Replace the code
Code:
if ((!empty($field->fieldsetcounter)) && ($field->fieldsetcounter > 1))
{
//add a back button
$html .= '<input type="button" class="btn back_btn" value="'.JText::_('COM_VISFORMS_STEP_BACK').'"/> ';
}
with
Code:
if ((!empty($field->fieldsetcounter)) && ($field->fieldsetcounter > 1))
{
$backButtonText = (!empty($field->backbtntext)) ? $field->backbtntext : JText::_('COM_VISFORMS_STEP_BACK');
//add a back button
$html .= '<input type="button" class="btn back_btn" value="'.$backButtonText.'"/> ';
}
Save changes and close file.
This should fix the problem.
Regards,
Aicha