Giter Site home page Giter Site logo

ONTRAforms about sdk-php HOT 16 CLOSED

tillkruss avatar tillkruss commented on May 19, 2024
ONTRAforms

from sdk-php.

Comments (16)

akent-op avatar akent-op commented on May 19, 2024 1

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.

akent-op avatar akent-op commented on May 19, 2024 1

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.

akent-op avatar akent-op commented on May 19, 2024 1

OK, the release is nigh. Code was just merged and will be released on Tuesday.

from sdk-php.

tillkruss avatar tillkruss commented on May 19, 2024 1

Thanks. Quick note: the method is called retrieveFormHTML().

from sdk-php.

akent-op avatar akent-op commented on May 19, 2024

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.

tillkruss avatar tillkruss commented on May 19, 2024

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.

akent-op avatar akent-op commented on May 19, 2024

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.

tillkruss avatar tillkruss commented on May 19, 2024

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?

Screen Shot 2019-05-29 at 12 32 09 PM

from sdk-php.

akent-op avatar akent-op commented on May 19, 2024

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.

tillkruss avatar tillkruss commented on May 19, 2024

How soon will this be implemented and how do we know when it is?

from sdk-php.

tillkruss avatar tillkruss commented on May 19, 2024

That's fantastic, thanks!

from sdk-php.

tillkruss avatar tillkruss commented on May 19, 2024

@arielle-ontraport: Any updates?

from sdk-php.

akent-op avatar akent-op commented on May 19, 2024

Hey Till,

Sorry, not yet. Aiming to get this in the release sometime next week.

from sdk-php.

akent-op avatar akent-op commented on May 19, 2024

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.

tillkruss avatar tillkruss commented on May 19, 2024

Amazing! Just in time!

from sdk-php.

akent-op avatar akent-op commented on May 19, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.