Forum Discussion
DanDan1
8 years agoQrew Member
That &ifv parameter is a total hack and it is no surprise that it does not work in all cases (such as on ?a=nwr pages)
The simplest way to solve the problem is with another better total hack. Implement the IOL technique and additional style a button onto the end of the IOL formula like so:
[iol] & "module.js" & [/iol]
&
"<a class='QBU_Button Vibrant Success'>Save Record Button</a>"
Now in the module.js file put a click handler on a.QBU_Button that will submit the form using the FormData API:
You can search the forum and the pastie database for "FormData" for prior answers / demos I posted. When doing this (placing a form in an <iframe>) your form should be "small" and should not have any fields that might cause special validation criteria (like distinct/unique values) that would cause the form to redirect before submitting. In other words you should probably only include simple fields such as text, number without any additional validation. If you get stuck I can follow up next week. I am just trying to answer a few accumulated questions before the day ends.
TRIVIA: Does anyone know what the value of the ?ifv= parameter does? The answer might surprise you but you can try different values and find out yourself: ?ifv=0, ?ifv=1, ?ifv=10 ... ?ifv=100
I told you it was a hack!
The simplest way to solve the problem is with another better total hack. Implement the IOL technique and additional style a button onto the end of the IOL formula like so:
[iol] & "module.js" & [/iol]
&
"<a class='QBU_Button Vibrant Success'>Save Record Button</a>"
Now in the module.js file put a click handler on a.QBU_Button that will submit the form using the FormData API:
You can search the forum and the pastie database for "FormData" for prior answers / demos I posted. When doing this (placing a form in an <iframe>) your form should be "small" and should not have any fields that might cause special validation criteria (like distinct/unique values) that would cause the form to redirect before submitting. In other words you should probably only include simple fields such as text, number without any additional validation. If you get stuck I can follow up next week. I am just trying to answer a few accumulated questions before the day ends.
TRIVIA: Does anyone know what the value of the ?ifv= parameter does? The answer might surprise you but you can try different values and find out yourself: ?ifv=0, ?ifv=1, ?ifv=10 ... ?ifv=100
I told you it was a hack!
KippKipp
8 years agoQrew Cadet
Dan, thank you for the detailed response, I haven't ventured in to this level of customization before so I will need to do some reading up on using .js files and APIs in QB before attempting your solution. I will let you know how it goes!