Comments (16)
Hi Till,
I just got approval from our product team to implement this. I unfortunately do not have an exact ETA for you, as i the ticket needs to go through our regular process. However, I will keep you posted here as far as status so you will know when it is incoming. Hope this helps! Let me know if there is anything else I can do for you.
Best,
Arielle
from sdk-php.
Hi Till,
This functionality is implemented and moving into the testing phase. I will let you know when it is scheduled for release.
Best,
Arielle
from sdk-php.
OK, the release is nigh. Code was just merged and will be released on Tuesday.
from sdk-php.
Thanks. Quick note: the method is called retrieveFormHTML()
.
from sdk-php.
Hi Till,
We do not have a great deal of functionality exposed for manipulating ONTRAforms (or really any of our forms) via our API. What we do have exposed is available in our Forms.php class. Primarily, you can retrieve them, and retrieve the object meta. We do have code samples for our forms class here: https://api.ontraport.com/doc/?php#forms. Let me know if there is anything else I can do to help.
Best,
Arielle
from sdk-php.
Thanks, Arielle!
I really only want to retrieve the JavaScript embed codes via the API. Right now we're copying the script tags around and it's impossible to know what's what.
Being able to fetch the script tags would be great, similar to what you offer with the SmartForm HTML.
I'm refering to these tags:
<script type='text/javascript' async='true' src='https://app.ontraport.com/js/ontraport/opt_assets/drivers/opf.js' data-opf-uid='p2c100000f100' data-opf-params='borderColor=#fff&borderSize=0px&embed=true&formHeight=1142&formWidth=589px&popPosition=mc&instance=n00000000'></script>
from sdk-php.
Ah gotcha. OK. We don't have that specific endpoint enabled for ONTRAforms currently, but if you use the Forms::retrieveSingle method and grab the json_raw_object property from that response, you can json_decode that property and grab the mergedData from it. This should get you the script tags you want. I will note this as a feature request and look into wrapping this functionality better for ONTRAforms.
from sdk-php.
Amazing. I see that's giving me the actual HTML. Is there any way to get the <script>
tags that I see under "Publish" on ontraport.com?
from sdk-php.
I see what you are saying. Sorry I misunderstood. We do not currently have an endpoint for this, but I can see its usefulness. I am going to look into this as a feature request.
from sdk-php.
How soon will this be implemented and how do we know when it is?
from sdk-php.
That's fantastic, thanks!
from sdk-php.
@arielle-ontraport: Any updates?
from sdk-php.
Hey Till,
Sorry, not yet. Aiming to get this in the release sometime next week.
from sdk-php.
Just an update: QA is almost done testing this, I will let you know when it gets merged in and has a firm release date.
from sdk-php.
Amazing! Just in time!
from sdk-php.
Code was released this morning. For the SDK, we wrapped the original retrieveSmartFormHTML function into retrieveFormHtml which you can use on ONTRAforms as well. Let me know if I can be of further assistance!
from sdk-php.
Related Issues (12)
- I think there is something wrong with the updates you have done HOT 3
- HTTP response codes are discarded HOT 1
- No way to pull product information HOT 3
- saveOrUpdate not working with custom objects HOT 2
- Setting IP address / location via API HOT 4
- Packagist out of date HOT 1
- Custom Object Tag By Name Not Working HOT 2
- How to construct externs query string - {object}//{field} HOT 2
- Form API question HOT 4
- update composer package? HOT 1
- Contacts saveOrUpdate HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sdk-php.