Announcement
Collapse
No announcement yet.
Add a Link with parameters
Collapse
X
-
aysal
I think you need to get the structure right first.
Write field names in English, then you will have fewer problems in the forum if a question does arise.
Change your fields from
Vorname -> firstName
Nachname -> lastName
E-mail -> eMail
The field names always start with a lower case letter, as shalmaxb already mentioned.
Then your formula should look like this:
PHP Code:erstgespraechTermin = string\concatenate('https://cal.com/ender-aysal-gznuwa/finales-beratungsgesprach?firstname=',firstName,'&email=',eMail);
The attributes of cal.com must of course be correct. I can't tell you what they are called because I don't use cal.com.
So are they firstname and email ?
- Likes 1
Leave a comment:
-
There is at least one more error in the formula: it must be erstgespraechTermin, filed names start with small letter.
And I do not really understand firstname and &email. Should these word be part of the URL? Because how you wrote the string, the terms firstname and &email will be output. Or would you like to have these as placeholders?
-
If you try out a new formula, be sure to try the sandbox in the admin area.
It will also tell you where the error is.
#Admin/formulaSandbox
In the frontend, it will not execute the formula if it is incorrect. But it also does not display an error.
-
Oh, now I've found the error.
I gave you the wrong tip.
The thing with the brackets was only in mail templates.
And leave out the last apostrophe!
PHP Code:buttonname = string\concatenate('https://domain.com/?firstname=',Vorname,'&Nachname=',Nachname,'&email=',E-Mail);
Last edited by ChrisSka83; 10-06-2024, 08:12 PM.
Leave a comment:
-
Recalculate formula?
In the entity Interested parties -> List view, select the desired data records, then a menu “Actions” -> Recalculate formula appears above them.
-
No, completely wrong.
#Admin/entityManager -> then your desired entity
-> formula -> custom script before saving.
Enter the formula there. Save.
Then go to the frontend, select your entry that should receive this formula.
In the actions drop-down menu above it, select -> Recalculate formula.
Leave a comment:
-
Thx - i put in my correct link and the parameters, but i still have a problem. Where do i put this php code to? I put it in Standard, but then the PHP-Code is as link in the button and not the gererated String - that throws an error if i want to save a new created link2 Photos
Leave a comment:
-
Thx - but i am a little confused. Actually the button is created and a url is added - but so far i havent used any formula to add the parameters. Lets say the url is "https://domain.com?firstname=<Firstname>;Lastname=<lastnam e>,email=<email>" How could i create that?
Leave a comment:
-
You have to "tell" the link everything, that you want to insert as the link and parameters. The parameter for opening the users e-mail client is href="mailto:contact@yourdomain.com", what means that you will have to build the whole string for the link with a formula (string\concatenate). How to do that is described in the documentation, it is easy.
Then you create the button and place it in your detail view of the respective entity. After that you will have to re-calculate all records, where the button should appear. This way the button should open the link as you wish.
If you still have problems, post the link with parameters, which you want to attach to the button, we can have a look and help.
Leave a comment:
-
Thx - but i still dont know what to do. Also i dont know where to put this new string into so that it is in every button?
Leave a comment:
-
Thx - i installed the plugin and was able to create a button and also to insert a link. But what do you meant with formula? How can i append lets say the email as a parameter to the url?
Leave a comment:
Leave a comment: