Eloqua form has `<eloqua />` tags inside input values - eloqua

Eloqua is generating forms:
http://codepen.io/EightArmsHQ/pen/6dce8530a881a3c5795e822ffefe508b?editors=1000
But the output html looks like this:
<input value="<eloqua type='emailfield' syntax='LastName' />" class="field-size-top-large" />
I assumed that the value attribute was something that was then going to be replaced by some Eloqua JavaScript, but when I view it on the page with JavaScript, sure enough its still there:
How can I remove these tags? Is this a bug with Eloqua?

I managed to remove these. The <eloqua /> tags are inside the value field like that because they are used on Eloqua hosted pages – so for instance if the marketing team are creating a landing or targeted page inside of Eloqua, or a page that is linked to from an Eloqua email. They only work on these Eloqua pages, not in self hosted forms.
If you are going to self host these forms (for example on your own website), here are the steps you can take to remove the tags:
Click the field
Click on the merge settings button
Select None
Note that the yellow disappears
Note that there is no longer a predefined value in the field

Related

How to insert dynamic content with Django admin interface

I have a simple model for blog posts with a TextField, I save my posts in html format via Django admin interface. But my posts often include hyperlinks to other blog post pages like click here, the number and target of links in a post vary. What is the easy way to insert those urls dynamically in Django admin panel (like template tags used in templates)?
I found an answer, I think this can be done with using builtin url tags like {% url 'blog:posts' 123 %} in my text, saving the text as a template and rendering it again. Either in the view or in the template with a custom template filter.

TFS Work Item HyperLink from TextBox

Im trying to create a hyperlink on my form that has the URL specified in another field.
I found the Link control which can almost do this, but i dont see a way to configure it use the URL specified in another field.
Something like this might work, but i would have a double https:// in the url.
Is there a way to take a substring of the value so that i can remove the https part ?
Or is there another way to add a link to the work item form that uses the URL from another field.
<Link UrlRoot="https://" UrlPath="{0}">
<Param Index="0" Value="Custom.UrlField" Type="Original"/>
</Link>
Using the HTML field would in theory also be an option, but only if we can hide the HTML buttons and use a small height, this way the URL pasted in this field will become a clickable URL.
No, that's not supported. See Provide help text, hyperlinks, or web content on a work item form
You have to specify the URL directly like this:
<Link UrlRoot="http://www.live.com"></Link>
The syntax to specify a hyperlink with parameters should be like this (See Link and Param XML elements reference):
<Link UrlRoot="http://serverName" UrlPath="sites/{0}/render.aspx?wit=bug&topic=Iteration">
<Param Index="0" Value="System.Project" />
</Link>
That means you need to provide the "http://serverName", only specify "https://" is not working, reference below screenshot.
In your scenario, we can not get the value of another field to set the hyperlink in work item form. There's a Copy Rule for fileds, but it's not available for work item form.
COPY Copies a specified value to a field when a user creates or modifies a work item. See Add a rule to a work item type

Rendering html using Struts2

Using Struts2, my goal is to present a simple blog to a user using Struts2 iterators, such as:
Most Recent Topic
response 1
response 2
...
Previous Topic
response 1
response 2
...
Users generate and submit each Topic/Response using a separate form, but, once submitted, I don't want them to edit the blog.
To generate either a Topic or a Response, I provide an editor (like the stackoverflow editor I'm using now) that produces html-formatted text, including whatever styling (bold, underlines, lists, etc.) that the user chooses. The text of the Topic/Response created by the user, including the html tags, is stored in a database.
However, I cannot find a way to render the Topic/Response as html in the blog. For example, text bolded in the editor shows up as <strong>text</strong> in a struts2 s:textarea tag.
I know that the s:property tag has an 'escapeHtml' attribute that will prevent this, but the s:property tag can't layout the text properly, and it seems that only the s:property tag has this attribute.
I've tried using <input value="%{#topic.content}" /> within the iterator instead of s:textarea, but it doesn't seem to recognize the #topic iteration reference.
Is there a way to do this?
use text instated of tax area .Let me know if you still facing this issue.
Use escapeHtml="false". I just tried it myself and it works as intended.
For example, with:
<s:set var="var1"><p>some stuff</p><p>other stuff</p></s:set>
<s:property value="var1" escapeHtml="false" />
renders the paragraph tags as you would expect.
How about using <pre> with <s:property>.
About html <pre> tag:
http://www.w3schools.com/tags/tag_pre.asp

Using wildcard for custom HTML tags in Rubymine

I'm developing a lot of RadiantCMS applications, and this CMS uses custom radiant tags which are translated to content and html at runtime. So, my HTML templates have a markup like this:
<body>
<div class="content">
<r:content />
</div>
...
</body>
This is all fine, but Rubymine complains about all the <r:content /> tags being invalid html. The effect is that my html-templates are loaded with error-notifications.
I know that you can customize the Rubymine Inspections, and allow Custom HTML Tags, but there are almost unlimited <r:... /> tags available. To add all possibilities in the customtags field would be hours of work and not very flexible, because new tags come and go by the month.
What I want to do is pass in a wildcard for the r: so that all those tags are allowed as valid html tags. I tried some REGEX options but gave me no results.
Does anyone have experience with Rubymine Inspections and how to overcome this issue?
There is a feature to define inspections per Scope. You can add a new Scope for all your project files except these template files (they can be excluded either by directory or name pattern). Then in the Inspection settings you can add this scope and configure the inspection reporting invalid HTML tags to trigger only in the custom scope, not for all the files. As your templates with <r:... /> are excluded from this scope, inspection will not report such files.
It's not ideal, as it will not report other possibly invalid tags in the template files, but right now there is no way to ignore tags by pattern, but you can submit a feature request.

is it possible to nest one form inside another in razor?

I put the begin/end form statement in the layout page so that I don't have to repeat it on several pages. Below's a simplified version of the code.
#using(Html.BeginForm())
{
#RenderBody()
<input type = "submit" name = "nextButton" value = "Next-->" />
}
Things are working well. Unfortunately, I have a page that has several "Delete" buttons. I want to generate a form for each delete button so that it can send the id of the item to delete back to the controller.
Can I do that knowing that there's already another form on top of that?
Thanks for helping
As Mrchief says, the the HTML specs forbid nested forms. Since MVC just generates standard HTML, you have to work withinn the framework of the spec.
Why not just create two master layouts, and use the form based one most of the time, but use one without a form when you need more control over the embedded forms.
This is the why you should really only use forms exactly where they are needed, not just everywhere.
Do note that nesting of forms is not allowed as per the W3 specs
Every form must be enclosed within a FORM element. There can be
several forms in a single document, but the FORM element can't be
nested.
There is an interseting article about caveats of nesting forms here.
In this case, it is better to generate a form for each button instead of having a single form.
ASP.Net web forms restricted you from having multiple forms on the page by using runat=server attribute (and the framework ensuring that only one per page was allowed). MVC forms are pure HTML so you can have multiple of them.

Resources