User Input Custom Price for Stripe Elementor Widget - elementor

enter image description here
I want to let user choose how much price amount want to pay. For that a Text Input will be added, and Using Stripe button we process it.
I tried ACF Plugin but no luck. I need user can input any value and only that much can be processed using stripe. I also tried to use JS to change the value but the value and other meta information are stored in DB I guess.

Related

Salesforce Screen flow search and display record information

I'm working on a screen flow. The idea is to have a lookup component the user can search a contact. Then I would like to display the information from the Contact (Account Name, Contact Name, Number Email) and I would like to be able to have the user update that information if needed. I just stomped on how it can be done. I know it should be able to be pulled from the record ID in some type of way and maybe use an Assignment to display the information. Can someone guide me on a next step or if anyone has an instructional video would be helpful.
Thanks
You wouldn't be able to display the looked up contact's fields on that screen as soon as you populate that field. That would be something only possible in code (aura component or lwc).
What you can do, however is -
Get Record element after that screen element. (Get Contact, where Id = lookupcomponent.recordId)
Then EITHER:
use the new Fields (BETA) option on another screen Fields (BETA)
(this method is easier, doesn't have as much control and is limited on fields, depending on data type, you can use)
add inputs one by one and set the default values Add Fields One By One
(this method allows more control)
Then, you will need an update element. If you used the Fields (BETA) you can just update the record variable. If you did the inputs one by one, you will need to update the contact and set fields individually.
Full Flow Example

How to pass table data to Array of objects so i can submit the result in Formik?

Hello there Hope you doing great,
I have tried to implement an idea which is as follow , but I failed, let me know if you can help me out :
So , there is two textfield inputs type select where the user should select the course and its payment method and add it to the table and he/she could as well add more then one course as well delete if they need to
So the main problem here by the way I am using mui multistep form using formik and I want to submit the content of the table after they finished selecting as an array of objects like every course and its payment method Together
and about the validation should test whether the length of the table is 0 So its gonna return a massage tells you have to select at least one course
enter image description here
enter image description here
enter image description here
enter image description here
enter image description here

Variable value for Amount for Salesforce opportunity API

I'm working on a Magento website. In that, after the customer is done with adding products to the cart he fills a form and once the form is submitted, form data along with product details like SKU, price is sent to Salesforce to create a new opportunity.
The API is working and the Data is going to salesforce, but the issue is that the same product can have different prices based on certain conditions.
the new amount going to salesforce but on the salesforce side, the new amount is not reflecting but the amount when the product is created for the first time is coming.
is there any way to make the amount a variable field so the new amount reflects?
below is an image of the opportunity and the JSON data I'm sending.
{"StageName":"New Opportunity","Name":"test","CloseDate":"2021-06-04","What_are_you_interested_in__c":"Purchase New Trailer","Product_JSON__c":"[{\"Name\":\"Large Trailers\",\"Sku\":\"large-trailers-rent\",\"Quantity\":1,\"Price\":\"1301.0400\"}]","Purchase_Delivery_Contact_Phone__c":"123","On_Site_Contact_Email__c":"test-12#test-12.com","Mailing_Street__c":"test-12","Delivery_Street__c":"","Qty__c":"1","X66969__c":0,"First_Name__c":"test-12","Last_Name__c":"test-12"}
This request looks weird. Vanilla Salesforce doesn't need hacks like a text field to hold serialised JSON in it (Product_JSON__c).
Where do you send it? Normal POST to something like services/data/v51.0/sobjects/Opportunity or some custom endpoint (it'd have "/apexrest" in the URL). Even if it goes to normal endpoint - I guess there's trigger that deserialises this Product_JSON__c and creates OpportunityLineItems out of it. You'll have to chat with developer responsible for that trigger, we can't tell what's going on in there.
In general yes, it's possible to have variable prices. You (or that developer) have to read up about OpportunityLineItem. There's ListPrice,UnitPrice,TotalPrice,Discount, lots of choices to do this right and report properly on the discounts! And there are tips like
Creating an OpportunityLineItem increments the Opportunity Amount
value by the TotalPrice of the OpportunityLineItem
There are ways to do it properly, insert header (Opportunity) and line items in one go, without such hacks. See
https://salesforce.stackexchange.com/questions/155422/using-the-rest-api-to-create-parent-and-child-records-in-a-single-http-request
https://salesforce.stackexchange.com/questions/274694/can-you-upsert-using-composite-sobject-tree
https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_composite_sobject_tree.htm

Docusign Formatting and Salesforce integration issue

I am in a Salesforce environment and trying to send out a docusign document using Docusign and Conga. I am using a 30 day trial.
1.Using Conga and Docusign works very well together and the formatting is correct except that I need to have 2 radio buttons on the form. Is there a way to add anchor tags to my Word document and hide them(white text) like I do for the Docusign signature and date tags?
I tried following the documentation for creating the radio buttons in Docusign and tie them to a picklist field in Salesforce but I have yet been able to write back to Salesforce.
How do you control the text length for a Docusign template? I have fields that make up the address but the spacing is not dynamic so depending on the field value the text may run into each other. Is there a way to have the fields adjust based on field value length?
How do I show multiple related records? I have a case with multiple activities associated to it and I need to display them. In Conga I use a table and all of the records show. But if I create a docusign template it is only showing the first record.
If at all possible I would prefer to add the anchor tags to the existing document since the formatting is cleaner.
Michael
There is. You'll want to avoid applying anchor tags directly to a DocuSign template when working in the web console. The reason for this is that when you're sending from Salesforce with or without Salesforce anchor strings you're going to receive an error message indicating that there's no text associated with an anchor string.
You can accomplish this through Custom Fields inside of Salesforce.
Basically, you place your text in white where you want the tag to attach to your document. You'll want to set the anchor string in the format of \variable{r}\ on the tag, then in the underlying document you would replace {r} with the recipient number in the signing order.
IE: \variable_{r}\ becomes \variable_1\, when Salesforce picks this up it will tag the document automatically. For more information, see here: https://support.docusign.com/guides/dfs-user-guide-use-automatic-anchor-text-with-custom-tags-user.
In terms of writing back the value of a Radio Button, as I'm sure you've noticed this can be tricky. The values for the picklist in Salesforce need to match up exactly, then be written back by adding a new line in your Connect object. A step by step guide is available on the support site: https://support.docusign.com/articles/DocuSign-for-Salesforce-How-to-update-a-Salesforce-Field-with-a-DocuSign-Radio-Button-Value.
The Width of a text field is determined in one of a few ways:
1) You can supply a fixed size in the API call being used to generate them.
2) You can save the custom field inside of DocuSign as a Custom Field after setting the width to it.
3) Set the Fixed Size flag to false, then the text field should fill itself out when text is applied to it.
Would you mind being more specific in regards to the status record?

How to validate form field with Parsley JS if field input has been populated automatically?

I have a signup form where the user is supposed to enter amongst other personal details also his phone number's country prefix (e.g. '+49' for Germany). Now I have a script running which automatically detects the country prefix according to the user's IP geo location.
If the IP location is successfully determining the user's current location, it puts the country code automatically in the signup form's prefix field.
This means that the user doesn't have to enter the prefix manually.
My question is: once the signup form is loading, and all fields are empty except for the country prefix, how can I validate the country prefix field successfully prior to hitting the submit button?
I tried all kinds of triggers from the jQuery Events page as suggested by the ParsleyJS documentation but I don't get it done..
Any help on this would be gladly appreciated!
Edit to further clarify: If you're visiting the signup page, the IP location script detects your location, translates that into your country's phone prefix, and puts that number into the "Prefix" form field. So you don't have to put there anymore by yourself. This works only if the the IP locations script successfully identifies your location of course, however this works in most of the cases. So what I would like to achieve is that this form gets it's green validated background, although you didn't put in the prefix yourself. In other words, the prefix is already in the field in most of the cases.
I'm using the data-parsley-triggers, no jQuery or JS to validate the whole form.
You can see in the picture that I entered a first name, Foo, which validated upon data-parsley-trigger="change". The blue arrows show the fields which have been filled automatically by the IP location - and they are not validated as I'm missing the right trigger.
It's not clear what you are trying to achieve (why validate the field when it's clear it will be valid), but why not simple $('input[name="phone_prefix"]').parsley().validate()?

Resources