hsntgm
Forum Replies Created
-
Hello,
I tried your solution but my form structure ignored it:)
I found a solution with this key code and of course with lots of manuel other rules. I realised cff use validate.js so it always assign this class etc.
.hasClass('valid')
Also i implemented lobibox jquery plugin.It works pretty well but before it needs some code changes.I see that cff functions works with jQuery not $ it is a little confusing.
Maybe you want to check this handy lobibox jquery library for cff.
Best regards.
PS: I started to my project with zero coding knowledge.I faced lots of problems and solved many of them without direct help.Thanks to your plugin it has a very good framework to understand logic of programming(especially jQuery in my perspective).
I will ask you again if i cant understand some code logic.But you are always free to reply me with your default customization offer without ‘I’am sorry’.This is your job.For me it isn’t about to money.It is about to learing.
- This reply was modified 7 years, 10 months ago by hsntgm.
Forum: Plugins
In reply to: [Calculated Fields Form] Retina Image supportBrilliant !
It is working.
I understand the logic now.Sincerely,
Forum: Plugins
In reply to: [Calculated Fields Form] Retina Image supportHello,
I am suprised that i only added my double sized image link to html field and now it is retina ready on all devices.
[email protected] = width=”286″ height=”228″
<img class="aligncenter" src="[email protected]" alt="" style="margin-top: -25px;" width="143" height="114">
But honestly i didn’t understand the logic. I tried to make it with jQuery code. Maybe my main theme codes helped me.
And you are welcome to my project it is live on here
It will be online (home,office) renovation bid system if i can handle it.
Thank you very much for your all support.
Hasan.Forum: Plugins
In reply to: [Calculated Fields Form] Retina Image supportEdit:
Still doesn’t work. This was a good try ??HTML content (fieldname286):
<img class="replace-2x" src=".../wp-content/uploads/2017/01/logofff.png" alt="" width="143" height="114" />
jQuery Code:
<script> jQuery(document).on( 'ready', function isRetinaDisplay() { if (window.matchMedia) { var mq = window.matchMedia('only screen and (min--moz-device-pixel-ratio: 1.3), only screen and (-o-min-device-pixel-ratio: 2.6/2), only screen and (-webkit-min-device-pixel-ratio: 1.3), only screen and (min-device-pixel-ratio: 1.3), only screen and (min-resolution: 1.3dppx)'); return (mq && mq.matches || (window.devicePixelRatio > 1)); } if (window.isRetinaDisplay()) { var img_to_replace = jQuery('[id*="fieldname'+'286_"]').find('img.replace-2x').get(); for (var i=0,l=img_to_replace.length; i<l; i++) { var src = img_to_replace[i].src; src = src.replace(/\.(png|jpg|gif)+$/i, '@2x.$1'); img_to_replace[i].src = src; }; } }); </script>
Anyway maybe this is too much for unpaid member.You don’t need to answer that.
Thanks.
- This reply was modified 7 years, 10 months ago by hsntgm.
That is exactly what am i looking for !
Great solution.
You are a javascript god for me.
First Zeus then Codepeople.Thanks in advance.
And the solution i found, maybe it helps someone.
<script> jQuery(document).on( 'click', '[id*="fieldname'+'1_"]:eq(1)', function(){ jQuery(this).val(this.checked ? "TRUE" : "FALSE"); }); </script>
<script> jQuery(document).on( 'click', '[id*="fieldname'+'1_"]:eq(1)', function(){ var value = jQuery('[id*="fieldname'+'1_"]:eq(1)').val(); if (value == 'TRUE') { jQuery('[id*="fieldname'+'1_"]:eq(3)').prop('disabled', true); } else { jQuery('[id*="fieldname'+'1_"]:eq(3)').prop('disabled', false); } }); </script>
- This reply was modified 7 years, 10 months ago by hsntgm.
Forum: Plugins
In reply to: [Calculated Fields Form] When clicked checkbox assign values to input field.Hello,
You are right.
Also I want to add;
Code working with this definition;
var value = jQuery('[id*="fieldname234_"]').val();
Not working with this definition;
var value = jQuery(this).val();
And condition must be FALSE because my code isn’t perfect. ?? Maybe i have to declare document ready function but i couldn’t managed to do it.
Working condition;
if (value == 'FALSE')
Anyway thanks god it is working with these complete code. Maybe helps someone.
Change the value of checkbox when clicked.
<script> jQuery(document).on( 'change', '[id*="fieldname'+'234_"]', function(){ jQuery(this).val(this.checked ? "TRUE" : "FALSE"); }); </script>
If checkbox clicked, assign values to other input fields.
<script> jQuery(document).on( 'click', '[id*="fieldname234_"]', function(){ var value = jQuery('[id*="fieldname234_"]').val(); if (value == 'FALSE') { jQuery('[id*="fieldname84_"],[id*="fieldname69_"],[id*="fieldname78_"],[id*="fieldname74_"],[id*="fieldname88_"],[id*="fieldname97_"],[id*="fieldname100_"],[id*="fieldname103_"],[id*="fieldname106_"]').val(jQuery('[id*="fieldname13_"]').val()).change(); } else { jQuery('[id*="fieldname84_"],[id*="fieldname69_"],[id*="fieldname78_"],[id*="fieldname74_"],[id*="fieldname88_"],[id*="fieldname97_"],[id*="fieldname100_"],[id*="fieldname103_"],[id*="fieldname106_"]').val('').change(); } }); </script>
Thanks.
PS: I will pay you because i am learning JQuery ??
Hi,
Not working,
I added your code to my button’s onclick event area still when user click the button the other calculated fields which depends to fieldname1,fieldname2 and fieldname3 don’t change.
jQuery(‘[id*=”fieldname1_”]’).val(0).change();
jQuery(‘[id*=”fieldname2_”]’).val(0).change();
jQuery(‘[id*=”fieldname3_”]’).val(0).change();Maybe i need a code when my button clicked, reset only these specific three fields (not whole form)!. Because if i choose button type *reset in plugin it calls all equations with new assigned values but i don’t want to reset whole form.
Thanks for your effort.
Edit:
I managed to solve it. I changed button type *calculate* in the plugin. ??Simply when i change input field values internally (without user touch) for example by onclickevent jQuery(‘[id*=”fieldname3_”]’).val(0) calculated fields don’t read the new values which has been assigned internally and continue to calculate them with previously entered (user touched) values.
Thanks.
I have one more issue.
(function(){
var v = fieldname1*fieldname2*fieldname3;
jQuery( ‘.myclass .uh’).html(v);
return v;
})()When form user hide these input values (fieldname1,fieldname2 and fieldname3) for example by remove this section button I hide them with Jquery hide() and could be entered some values already so i assign to these fields new val(‘0’) to reset fields for get new fresh calculation. But after new values assigned it still brings and write old calculated values to instr.text .uh field. Maybe it doesn’t calculate it with new assigned values because of hide() or javascript cache i don’t know.
I will need your extra customization (Instant Bid -print to pdf and send e-mail to customer and save database 1 copy for us) at the end of the project. I hope we can migrate my project with your paid version.But i believe i can handle these small parts of project it is enjoyable.
Thanks.
It is working:) I strongly advise this plugin.
Best plugin bonus +best support. After my project done I’ll share how talented this plugin is..
Thanks.
Edit:
Sorry for double post. I had a logic problem which i have just realised. My problem is also changed that i described previous post.
First i managed to get fieldnameX value from field with below code. When button clicked it set value of instruc.text .uh element. Maybe it can be helpful someone.
jQuery( ‘.myclass .uh’).html( jQuery(‘[id*=”fieldname’+’X_”]’).val() );
But when button clicked and passed next page fieldnamex hasn’t been calculated yet. ?? So i have a value 0.
Finally, my question is, have three input fields (number) and 1 calculated field (fieldnamex) which has calculation – input field 1 * input field 2 * input field 3-.
I want to do that while user filling these input fields the calculated result show in insctruc.text .uh element dynamically.
Thanks,