问题标签 [formit]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
2 回答
985 浏览

modx - 如何从 FormIt、MODx revo 中的挂钩设置 redirectParams?

如何redirectParams从 FormIt、MODx revo 中的挂钩设置?我需要它以便在编辑后使用正确的编辑 ID 将用户重定向到查看页面。问题是:如果在钩子之前不知道 ID(就像创建新东西的情况一样),我不能redirectParams正确设置,或者我可以吗?

0 投票
1 回答
694 浏览

modx - Formit,在 preHook 中传递值

是否可以将值从链接传递到表单?我有一个包含四个不同链接的页面,它们都应该重定向到一个表单。它们中的每一个都应该具有不同的值,并基于该值显示不同的(内容)下拉列表。?有任何想法吗?

0 投票
1 回答
1408 浏览

variables - ModX Revolution Form它将url变量传递给form

我在 Modx Revolution 中额外使用 FormIt,我有一个类似的网址

我想将这些值传递到页面上的新表单中。在不使用 JS 的情况下如何做到这一点?谢谢

0 投票
1 回答
432 浏览

modx - Modx 革命 Godaddy 电子邮件设置

我是 modx 的新手,我已经阅读了很多关于 godaddy 免费电子邮件和 modx smtp 设置的文章。有人可以为我提供正确的 smtp 设置以使 Godaddy 电子邮件正常工作吗?我想说我正在使用formit。

我试过的

用户名 - 完整的 Godaddy 电子邮件地址 密码 安全认证 - 是 smtp 主机 - relay-hosting.secureserver.net smtp 端口 - 465 使用 smtp - 是

我也尝试过不使用端口 25 进行身份验证

我还想说这个网站是由 godaddy 的一个便宜的托管包托管的,它带有免费的电子邮件帐户。

提交表单后,页面被重定向到主页,我看到作为 url 参数嵌入的电子邮件数据。但是它没有被清除,我不确定插件是否有问题没有正确提交表单,或者我只需要添加一个正确的重定向。任何帮助,将不胜感激。

0 投票
1 回答
581 浏览

jquery - jQuery Tabs with MODx Revo Formit - on validation error, keep hash in URL

I'm trying for several hours to get my Contact-Form work correctly. The form itself has some tabs in it. The code for the tabs I'm using is from this site http://jqueryfordesigners.com/jquery-tabs/

This is the script-code I'm using:

This works well so far. The tabs are being showed correctly as desired. The form I made with the FormIt-Package from Modx Revo works too!

Now the problem...when I click on submit and the validation fails (e.g. the user forgets to fill a mandatory field), the site will be refreshed and the last selected tab is not shown, the page always shows the first tab.

I want to view the last visited tab on validation error->page reload.

With this edit I can achieve that the desired tab gets opened via a hash-tag (ID of the tab) in the URL (e.g. www.xyz.com/contact.html?tab=#two):

If I enter the site with the above URL, I can view the second tab as desired.

When I finally submit the form and a mandatory field is missing, the page reloads and puts out the errors. But the last viewed tab is not opened, instead none of the tabs is opened, because the URL "looses" it's hash-tag.

How can I achieve that the last visited/selected tab gets shown on page reload/refresh?

I tried to add the ID of a tab to the URL with this code inbetween line 10 and 12 in the first script-code:

This has the effect that the ID gets added to the URL as a hash-tag by clicking on a tab. But on submitting the form, the URL "looses" the hast-tag and refreshes the page. On page load the URL is changed to www.xyz.com/contact.html#one. Whatever I try to type in like www.xyz.com/contact.html#two or www.xyz.com/contact.html#three the URL always changes back to www.xyz.com/contact.html#one

Any hints are appreciated! Thanks in advance!

0 投票
1 回答
83 浏览

modx-revolution - MODX - getresource TV - 以电子邮件形式提交

想知道 MODx 或自定义片段中是否存在可以让我执行以下操作的内容:

我正在使用 getresources 来提取我的资源列表,包括附加到每个资源的一些电视。

我希望能够为每个资源添加一个按钮,按下该按钮后,一封电子邮件将发送到登录用户的电子邮件地址,其中包含一些资源电视。

任何想法提前谢谢

0 投票
2 回答
308 浏览

caching - 我的 FormIt 钩子被缓存了,它在第一次之后的每次运行都搞砸了

我将以下代码段连接到 FormIt 电子邮件表单:

它每次运行时都会增加一个模板变量并输出一条成功消息(尽管现在我正在使用该功能来输出调试消息)。问题是,它只在保存片段后增加电视一次,从而刷新缓存。通常我会通过附加来调用没有缓存的片段!以它的名字命名,但这似乎不适用于 FormIt 钩子。我怎样才能让这个代码工作?现在,我将整个页面作为不可缓存的方式运行,但这显然不是最理想的。也许,有一种方法可以以未缓存的方式挂钩片段?将片段中的片段调用为未缓存?

0 投票
2 回答
1505 浏览

modx-revolution - FormIt - 重定向挂钩问题

ISSUE:我正在使用 FormIt,重定向挂钩对我不起作用。

它重定向到http://www.example.comPageName.html而不是http://www.example.com/PageName.html。它没有在页面名称后放置正斜杠。

有没有人见过这个问题?

这是我的 FormIt 片段。

  • 是的,MyEmailChunk 存在。
  • 电子邮件地址是虚拟值
  • id 为 35 的资源位于相同的上下文中,并且已发布并从菜单中隐藏。
  • 我正在使用友好的网址。
  • 如果我尝试其他资源,它会起作用。
0 投票
1 回答
119 浏览

modx - MODx中带有Formt的空消息

这是我的发送页面代码:

我尝试了许多示例,但它们向我的电子邮件发送了空消息。

这是我的接收者页面代码:

但作为回应,我只有“这个消息()是用回调形式发送的:”。Modx 革命。

0 投票
1 回答
431 浏览

modx - Modx 表单 + fromz 重复电子邮件

我将最后一个 modx revo 与 formZ 一起使用,它会复制电子邮件。每次我提交表格时,我都会收到两次电子邮件。我想不通。这是我的表格tpl:

如何避免重复电子邮件?有任何想法吗?