internationalization (i18n) of the square payment form (v2) - square-connect

I am currently using the square v2 form in the application to load the payment form ( script: https://js.squareup.com/v2/paymentform)
Is there a way to translate the labels of the form (CC, MM/YY, Card Number etc) based on the user's locale or internationalization the form

Related

In cypress Is there any method to run 3 dependent forms individually?

I have 3 forms, and one form is depending on other 2 forms(Each form is in each test file), So my question is can i know is there any solution(method) to run those 3 forms individually?
(The purpose is i want to run each forms individually)
This is maker form
This is Category form
This is maker type form
These are the three forms which i have mentioned above.
Maker form, and Category form are depending on Maker type form, (The value i'm adding in maker and Category forms as above images, will have to choose from Maker type form)
So these Each three forms are in each test files.
When i run the test i can not run the maker type form individually, because its' maker and category values are taken by Maker form and Category form added values.
Your tests (e2e tests) should follow the user flow, so if one form requires another to complete the task, then that's how you test them.
BUT you can test forms independently using Component Testing. In this type of test you mount just one component (form) at a time and supply input values (normally coming from the other forms) via props.
Here is some info about it My Vision for Component Tests in Cypress

How to add customization options like some card maker websites

I'm trying to build a prototype of a website which allows a user to customize the position, colour, tag and name of their business card.
I want to know how can I save the position of any draggable and droppable element in the rails database so that the user can save it for the future
You should add position field to data model. Also, you can use acts_as_list gem or implement similar logic by yourself

Yii2 AJAX Validation upon filling Dynamic Forms

I am working on a Yii2 Project and I have a widget of dynamic form. My goal is to get the total percentage of all the items from the dynamic form everytime an items is added and check if it equals to 100. I want to do this using AJAX but I am not very familiar with it. Thank you in advance. Here is the screen cap of the page.

What is difference between Rules and validaton in infopath?

I am working on Microsoft office infopath 2007.I have inserted the controls as text box and drop down. when i get right click to control there are 2 option links as Data validation and Rules. what are the main difference in between them? I am new in infopath so need guidance.
when to use rules and when to use validations. can we customize validation and rules? and can we define custom rules and validation in infopath ?
Data validation can be used to display error alerts when users enter incorrect values into a form. Rather than checking for errors after a form is completed, data validation verifies values as the form is being filled out.
You can use rules to automatically display a dialog box, set a field's value, query or submit to a data connection, switch views, or open or close a form in response to certain events and conditions.
I'm not sure that you can create your own custom rules and data validation. But infopath forms can be customized by writing programming code to respond to form and data validation events, to access and manipulate a form's underlying XML document, to implement custom data submission and merges, and to implement access to external data sources.

How to create an AJAXified form within the Zend Framework

I'm trying to create a contact form. However at the top of the form the user can select using radio buttons whether he's contacting the technical department or the marketing department. Depending on which he selects, the entire form changes.
How would this be implemented within the Zend Framework? I'm already extending Zend_Form to make my forms. Also I'm working within the MVC style and would rather not break out of it.
Right now I simply do
echo $this->form;
in the view to render the form. I'm guessing that when the visitor clicks on one of the radio buttons, the controller will need to set a different form, but I'm not too sure how to go about that without re-rendering the entire page.
Thanks!
EDIT
I'm now thinking just setting something like this in the controller:
$this->view->contactFormTechDep = $formTechDep;
$this->view->contactFormMarketingDep = $formMarketingDep;
and render both, but hiding one all using Javascript.
I think you just need to show/hide the content of the form with JavaScript, not with php.
(with jQuery this can easyli be done)
But you'll have to keep in mind to be unobtrusive for users without javascript enabled

Resources