如何创建一个带有值的动态链接作为xh中url的一部分:orbeon中的链接?
<x131573079 type="input"/>
<xh:a target="_blank" href="concat('http://www.someurl.nl/new?code=', $x131573079)">linkwithcode</xh:a></xh:div>
我创建了一个最小设置也显示问题。该 我创建了一个最小设置显示问题。 {concat()}在这种情况下不起作用......
<?xml version="1.0" encoding="UTF-8"?>
<xh:head xml:lang="nl">
<xh:title>hyperlink</xh:title>
<xf:model id="fr-form-model" xxf:revisit-handling="reload" xxf:noscript-support="true">
<xf:instance id="fr-form-instance">
<form group-name="patrickgroep" form-name="hyperlink" form-title="">
<formname>hyperlink</formname>
<formtitle/>
<groupname>patrickgroep</groupname>
<tab_nav>
<tab_1 idx="1" name="x124675808" visibility="opened">true()</tab_1>
</tab_nav>
<x124675808 type="tab" tabidx="1">
<x124412365 type="block" layout="vertical" in_overview="true">
<x131573079 type="input" prefill="nu2"/>
<x177054053 type="output"/>
</x124412365>
<error_count/>
</x124675808>
<x124675808nav-button/>
</form>
</xf:instance>
<xf:bind id="fr-form-binds" ref="instance('fr-form-instance')">
<xf:bind id="formname-bind" ref="formname" name="formname"/>
<xf:bind id="formtitle-bind" ref="formtitle" name="formtitle"/>
<xf:bind id="groupname-bind" ref="groupname" name="groupname"/>
<xf:bind id="x124675808-bind" ref="x124675808" relevant="true()">
<xf:bind id="x124412365-bind" ref="x124412365" relevant="true()">
<xf:bind id="x131573079-bind" ref="x131573079" name="x131573079"
required="false()" readonly="false()" xxf:default="nu"/>
<xf:bind id="x177054053-bind" ref="x177054053"
calculate="if (xxf:evaluate-bind-property('x124412365-bind', 'relevant')) then (concat('http://somesite.com/page?code=',$x131573079)) else ''"
/>
</xf:bind>
</xf:bind>
</xf:bind>
<xf:instance id="fr-form-resources" xxf:cache="true">
<resources>
<resource xml:lang="nl">
<x124675808>
<label>MyTab</label>
</x124675808>
<x124412365>
<title/>
</x124412365>
<x131573079>
<label>vraag</label>
</x131573079>
<x177054053>
<label>whatever</label>
</x177054053>
</resource>
</resources>
</xf:instance>
</xf:model>
</xh:head>
<xh:body>
<xh:div id="variables"/>
<fr:view>
<xf:label ref="instance('fr-form-metadata')/title"/>
<fr:body>
<xf:group xxf:update="full" id="x124675808-section" bind="x124675808-bind"
class="tab-{if(xxf:instance('fr-form-instance')/tab_nav/tab_1='true()') then 'visible' else 'hidden'}">
<xh:h2 class="section-header">
<xf:output id="x124675808-title-text" mediatype="text/html"
ref="$form-resources/x124675808/label"/>
</xh:h2>
<xf:group id="x124675808-group">
<xf:group id="x124412365" bind="x124412365-bind"
class="default-block block-layout-vertical">
<xh:div id="x124412365-content">
<xh:div id="x131573079-content-item" class="block-layout-vertical">
<xf:input bind="x131573079-bind" id="x131573079-control">
<xf:label>
<xf:output id="x131573079-label-outputtext"
mediatype="text/html"
ref="$form-resources/x131573079/label"/>
</xf:label>
<xf:alert ref="$fr-resources/detail/labels/alert"/>
</xf:input>
</xh:div>
<xh:div id="x177054053-content-item" class="block-layout-vertical">
<xf:output bind="x177054053-bind" id="x177054053-control"
mediatype="text/html"/>
</xh:div>
<xh:div>
<xh:a target="_target"
href="{concat('http://somesite.com/page?code=',$x131573079)}"
>somesite.com</xh:a>
</xh:div>
</xh:div>
</xf:group>
</xf:group>
</xf:group>
</fr:body>
</fr:view>
</xh:body>
答案 0 :(得分:1)
这非常简单,您只需要在属性中添加<div class="container">
<form class="form-signin" method="POST" action="{% url 'account_login' %}">
{% csrf_token %}
{% if redirect_field_value %}
<input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}" />
{% endif %}
<h2 class="form-signin-heading">Please sign in</h2>
<div class="row">
<div class="col-xs-4 col-sm-4 col-md-4 col-lg-4">
</div>
<div class="col-xs-4 col-sm-4 col-md-4 col-lg-4">
<label for="id_login" name="login" class="sr-only">Username</label>
<input id="id_login" class="form-control" placeholder="Username" required autofocus>
</div>
<div class="col-xs-4 col-sm-4 col-md-4 col-lg-4">
</div>
</div>
<div class="row">
<div class="col-xs-4 col-sm-4 col-md-4 col-lg-4">
</div>
<div class="col-xs-4 col-sm-4 col-md-4 col-lg-4">
<label for="id_password" class="sr-only">Password</label>
<input type="password" id="id_password" name="password" class="form-control" placeholder="Password" required>
</div>
<div class="col-xs-4 col-sm-4 col-md-4 col-lg-4">
</div>
</div>
<div class="row">
<div class="col-xs-4 col-sm-4 col-md-4 col-lg-4"></div>
<div class="col-xs-4 col-sm-4 col-md-4 col-lg-4">
<div class="checkbox">
<label>
<input type="checkbox" value="remember-me"> Remember me
</label>
</div>
<a class="button secondaryAction" href="{% url 'account_reset_password' %}">{% trans "Forgot Password?" %}</a>
</div>
<div class="col-xs-4 col-sm-4 col-md-4 col-lg-4"></div>
</div>
<div class="row">
<div class="col-xs-4 col-sm-4 col-md-4 col-lg-4"></div>
<div class="col-xs-4 col-sm-4 col-md-4 col-lg-4">
<button class="btn btn-lg btn-primary btn-block" type="submit">Sign in</button>
</div>
<div class="col-xs-4 col-sm-4 col-md-4 col-lg-4"></div>
</div>
</form>
</div>
,大括号内的内容将被评估为XPath表达式:
{}
答案 1 :(得分:1)
我似乎已通过以下帖子解决了该问题:Orbeon Form Builder - hyperlink with dynamic url?
使用:
<xh:a target="_target" id="123"
href="http://www.nu.nl/code={x131573079}"
>somesite.com</xh:a>