TOPIC:

help with masked input fields 1 month 1 week ago #272215

  • Topic Author
  • bamhost
  • Offline
  • Expert Breezer
  • Expert Breezer
  • Posts: 212
  • Thanks: 1
Hello Sihana,

A while back you help me to setup a script to mask input fields.

It is working great with the exception that when I click in the input field, the cursor does not go to the beginning of the input field, instead, it places the cursor where ever I click. This is an issue because these fields expect a certain number of characters/integers.

I've searched on google and have not found any help with doing this...I've tried a couple of things, but they've not worked. I think something needs to be added to the mask script you installed, but again, I'm not sure.

Could you possibly log in and have a look and perhaps help me?

This message contains confidential information


Thank you for any help you can give. Please let me know what you do so that I can do the same to all other forms using mask.

Please Log in or Create an account to join the conversation.

help with masked input fields 1 month 1 week ago #272217

  • Topic Author
  • bamhost
  • Offline
  • Expert Breezer
  • Expert Breezer
  • Posts: 212
  • Thanks: 1
Sihana, I need to work on the forms, and open this specific form. Please let me know when you are ready to login so that I can close it as to not overwrite anything you do.

Please Log in or Create an account to join the conversation.

help with masked input fields 1 month 1 week ago #272236

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 10068
  • Karma: 3
  • Thanks: 679
Hi,

one question:
masked input fields works but you want that when someone click on field it start from the begining not from place where user click it?

UPDATE: also I tested in your backend and cursor is in the begining whetever I click
Also, in frontend too, whetever I click it is in the begining

Waiting for your feedback

Regards,
Tihana

Please Log in or Create an account to join the conversation.

Last edit: Post by tihana.krivic.

help with masked input fields 1 month 1 week ago #272243

  • Topic Author
  • bamhost
  • Offline
  • Expert Breezer
  • Expert Breezer
  • Posts: 212
  • Thanks: 1
Hello Tihana,

Sorry for the delay, I just got up lol.

Please see the attached image. When I click anywhere in a masked input field the cursor is in the position I click.

I'm not so worried about this on desktop view because most people tab between fields, but on mobile they don't.
Attachments:

Please Log in or Create an account to join the conversation.

help with masked input fields 1 month 1 week ago #272245

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 10068
  • Karma: 3
  • Thanks: 679
Hi,

what is the funny thing when I click anywhere in field cursor is in the begining LOL

But I will check it deeper, and come back to you

Regards,
Tihana

Please Log in or Create an account to join the conversation.

help with masked input fields 1 month 1 week ago #272286

  • Topic Author
  • bamhost
  • Offline
  • Expert Breezer
  • Expert Breezer
  • Posts: 212
  • Thanks: 1
Hello Tihana,

You can stop working on the mask script if that is what you are doing. I've found a more updated and secure masking script that I am going to implement as soon as I figure out how to use it.

I do need your help with a couple of things:

1. I had submitted a reply to one of my older posts asking about the status of the ability to copy my forms: crosstec.org/en/forums/5-bugs/131116-ele...s-copied.html#272211

Because breezing forms is incrementing field id's incorrectly, please reply to the above post, I can't copy my forms to reuse without breaking all of my original due to id's changing in the scripts.

I really need to get my forms setup on my other sites and the ability to copy them without breaking the original forms is really important.

2. Okay, this one is difficult to explain. I have a discount field in my payment forms, in which a discount is "only" applied if user is paying by one of the several payment methods. The discount is not applied if user is paying by credit card or bank check.

Here is my problem. I cannot turn off, or I do not know how to turn off the discount field due to there being too many is and isnot statements, for example:

turn off element Discount if Payment_Method is Credit_Card
turn on element Discount if Payment_Method isnot Credit_Card
turn off element Discount if Payment_Method is Bank_Check
turn on element Discount if Payment_Method isnot Bank_Check

The above is what I need, but it doesn't work...it's like I need an "or" in there.

Is there a way I can write the above correctly so the discount field is turned off if the payment method is either Credit_Card or Bank_Check?

If there isn't, then the Discount field needs to be turned on all the time, therefore, it needs to display 0.00 in the field when there is no discount.

If this is the way to go, you helped me write the Action Script, and I have no idea how to modify it so that 0.00 displays in the Discount field when user pays by Credit Card or Bank Check. Here is the Action Script you wrote: (can you show me or tell me how to modify it?)

function ff_Subtotal_action(element, action)
{
switch (action) {
case 'change':
var Subtotal = ( Number(
ff_getElementByName('Payment_Due').value ) );
ff_getElementByName('Subtotal').value=Subtotal.toFixed(2);
if(ff_getElementByName('Payment_Method').value=="Credit_Card")
{
var test=Subtotal;
if(test < 50) {
test1=(test*0);
ff_getElementByName('cc_Processing_Fee').value=test1.toFixed(2);
test2=test+test1;
ff_getElementByName('Total_Fees_Due').value="$" + test2.toFixed(2);
}
else {
test1=(test*0.0345);
ff_getElementByName('cc_Processing_Fee').value=test1.toFixed(2);
test2=test+test1;
ff_getElementByName('Total_Fees_Due').value="$" + test2.toFixed(2);
}
}
else if(ff_getElementByName('Payment_Method').value=="Venmo"|| ff_getElementByName('Payment_Method').value=="PayPal" || ff_getElementByName('Payment_Method').value=="CashApp" || ff_getElementByName('Payment_Method').value=="Bank_Account") {
var test5=Subtotal;
var test6=(test5*10)/100;
ff_getElementByName('Discount').value=test6.toFixed(2);
test7=test5-test6;
ff_getElementByName('Total_Fees_Due').value="$" + test7.toFixed(2);
}
else {
test3=0;
test4=ff_getElementByName('Subtotal').value;
ff_getElementByName('cc_Processing_Fee').value=test3.toFixed(2);
ff_getElementByName('Discount').value=test3.toFixed(2);
ff_getElementByName('Total_Fees_Due').value="$" + test4;
}
break;
default:;
} // switch
} // ff_Subtotal_action

You can login using the previously provided login info, and you can find both the Discount field, and the Subtotal field the Action Script is applied to in the same form.

Thank you again for your help.

Please Log in or Create an account to join the conversation.

Moderators: ForumSupport
Time to create page: 0.053 seconds

BreezingForms Pro 1.4.7 for WordPress Released!

Available in the membership section.

September Discount!

Massive discounts on all subscriptions!

Get Your Subscription Here

Quick Links

Downloads

BreezingForms

ContentBuilder

BreezingCommerce

Templates

Documentation

BreezingForms

ContentBuilder

BreezingCommerce

Apprendre BreezingForms (French Community)

Apprendre et maîtriser BreezingForms par des tutoriels et exemples, le tout en français

breezingforms.eddy-vh.com

Questions et réponses sur les forums de l'AFUJ

AFUJ

Special Offer

Summer Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!