Expand my Community achievements bar.

SOLVED

form-based composer html & css & js

Avatar

Level 8

Hi, 

 

I am pretty new to Adobe Target. I would like to use form-based composer. How I am supposed to add html / css / js ?

There is no info in the documentation what is the best practice how to do that ....

Michael_Soprano_0-1701777721833.png

Thanks 

Mike 

 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

There isn't any best practice documentation as such because it's more driven by what the application making the request to Target can handle; in addition to that, it's typically used for server-side/Mobile App/IoT implementations where you would use a named mbox (i.e. not target-global-mbox). For client-side web implementations, the target-global-mbox is used by default by the Target library and then you can add html, css, JS as custom modifications within the Visual Editor workflow 

View solution in original post

3 Replies

Avatar

Correct answer by
Employee Advisor

There isn't any best practice documentation as such because it's more driven by what the application making the request to Target can handle; in addition to that, it's typically used for server-side/Mobile App/IoT implementations where you would use a named mbox (i.e. not target-global-mbox). For client-side web implementations, the target-global-mbox is used by default by the Target library and then you can add html, css, JS as custom modifications within the Visual Editor workflow 

Avatar

Employee

@Michael_Soprano  - you can enter the code directly while creating the activity, this would be an inline offer. However, a more flexible and re-usable way of using code, you might want to create HTML offers in the Target offers library

Avatar

Level 1

Certainly! Here's a comprehensive response:

---

Welcome to Adobe Target, and thank you for your question about using the form-based composer and integrating HTML/CSS/JS.

When using the form-based composer in Adobe Target, you have several options for adding HTML, CSS, and JavaScript to your experiences:

1. HTML: To add HTML content to your experience, you can use the "Custom Code" option within the form-based composer. This allows you to directly input your HTML code into the experience without any restrictions. Simply select the "Custom Code" option in the composer, and paste your HTML code into the provided text area.

2. CSS: For CSS styling, you can either include inline styles directly within the HTML code using the "style" attribute or link to external CSS files using the `<link>` tag. Inline styles are often preferred for simplicity and ease of management within the form-based composer. Ensure that your CSS rules are scoped appropriately to avoid unintended styling conflicts.

3. Javascript&colon; Similarly, you can include JavaScript functionality within your experience using the "Custom Code" option. This allows you to add event handlers, manipulate the DOM, or perform any other JavaScript operations as needed. It's important to note that any JavaScript code added should be compatible with the environment and adhere to Adobe Target's best practices and guidelines.

In terms of best practices for adding HTML/CSS/JS in Adobe Target's form-based composer:

- Modularity: Break down your code into modular components to promote reusability and maintainability.
- Testing: Always thoroughly test your experiences across different browsers and devices to ensure consistent rendering and functionality.

- Performance: Optimize your HTML, CSS, and JavaScript for performance to minimize page load times and improve user experience.

- Documentation: Document your code thoroughly, especially if you're collaborating with a team or revisiting the code in the future.

Additionally, Adobe Target's documentation provides valuable resources and guides for leveraging the form-based composer effectively. If you encounter any specific challenges or require further assistance, don't hesitate to consult the documentation or reach out to Adobe Target support for personalized guidance.

I hope this helps clarify how to add HTML/CSS/JS in Adobe Target's form-based composer. If you have any further questions or need additional assistance, feel free to ask!

Best regards,
[Khan zain]
Below are excellent resources for learn programming language:
1. W3Schools 2. Iqra Technology 3. JavaPoint