OKā¦thanks
Never done it beforeā¦
Can u paste me a short example of where to place it and how to override default āSave and Continueā button?
Thanks
OKā¦thanks
Never done it beforeā¦
Can u paste me a short example of where to place it and how to override default āSave and Continueā button?
Thanks
@rainolf
Look at customCode
of buttons in file: modules/Meetings/metadata/editviewdefs.php
.
The code of the button Save and Continue
is here: themes/SuiteP/include/EditView/actions_buttons.tpl
And you should remove default button Save and Continue
using javascript.
Sorry,
tried with no luck.
Probably this kind of things is currently out of my knowledge.
Any help is kindly appreciate.
Thanks
Regarding:
SUGAR.saveAndContinueCustom = function (elem){
elem.form.action.value='Save';
sendAndRedirect('<name_of_form>', '{$app_strings.LBL_SAVING} {$module}...', '{$list_link}');
}
What about {$list_link}?
Trying to replicate your suggestion but when i click custom Save ad Continue it redirects me to:
index.php/ {$list_link}
because $list_link is not going to be expanded.
Thanks
It was interesting case for me. I found a simple solution. Donāt modify button. Add the code to the end of function display
after parent::display();
.
if(!empty($this->ev->formName)){
echo "<script type=\"text/javascript\">document.getElementById('".$this->ev->formName."').setAttribute('id', 'EditView');</script>";
}
For me it works please check for you too.
Boom!!!
It works like a charm!
Thatās crazy.
Really appreciateā¦honestly it was a big challenge for me!
Hope to donāt disturb you againā¦
Many thanks
Now the next challenge is to prevent default submit in Save and Continue if one filed is missing or value is not compliantā¦done for save button following this tutorial:
https://www.youtube.com/watch?v=cn6daqxA3Sw
Any suggestion is welcome!
@rainolf
It isnāt standard for SuiteCRM decision. I recommend to use javascript functions removeFromValidate()
and addToValidate()
.
Iāve tried to insert a simple addToValidate just for test.
addToValidate('EditView','reference_number','int',true,'TEST');
What iāve seen after your modification is that Save and Continue is validating right while Save is throwing an error:
Uncaught TypeError: _form is null
This is related to changes in display function in order to avoid caching problems:
post:
$this->ev->formName='EditView_Mobile';
Not able to understand how i could fix this last issue
I checked again. Changing form id is not right way. Sorry.
Not a problemā¦appreciate your efforts
i am checking too
Hi, did you get any chance to find how we could solve the issue?
Thanks
I know how resolve the problem but I think that decision is not completely correctly. Main problem is that the file of html form uses the form name in the name itself. And the code of core SuiteCRM is using the form name EditView
as a constant into a lot of objects. There is a contradiction in this situation. You should change the form name but you cannāt change it.
You can work around this problem if switch on/off developmen mode. The form file in cache will be building each times. I think that is bad solution but it will works.
public function display(){
$_SESSION['developerMode']=true;
parent::display();
$_SESSION['developerMode']=false;
}
I think that the core code should be changed but itās enought big job.
I agree with you, it sounds too much off compliance.
Letās try to change the way we can achieve this.
In summary i need to change the number fileds to edit based on a ServiceType fileds value.
ex: when service type is Mobile only Mobile Number and ICCID will be visible while is Internet we will add Activation Address fileds.
In this way and after filtering the list view i can use Save ans Continue to make a sort of fast bulk edit for all records included in the filtered search.
Do you have any other possible way to do it without altering the core code and of course in an upgrade safe way?
Many thanks
action_view_map
or entry_point
) and frontend for loading fields using ajax. Itās a difficult task.Iāve tested your workaround and it works.
If nothing else is plausible then i could accept enabling temporary developer mode.
Thanks once again for your effort,
Appreciate