how to pass variables from Orbeon repeatable field to web service? - web-services

i have a problem with passing variables from Orbeon repeatable field to web service
In HTTP Service editor:
Serialization: HTML form
Request body:
<request><myvalue/></request>
in Actions Editor:
Source Control: myField
Destination XPath Expression: request/myvalue
It's working if myField is a single field, but how pass variables from repeatable field?

Unfortunately, as of Orbeon Forms 4.3, this is not possible. Form Builder actions don't yet support repeats. If you'd like to track this, you can follow RFE #1105.

Thank you,
maybe I can do some extra input field that will keep the values from repeatable fields with some separator?
I've made something like this:
string-join(//myRepetableField, '/');
and i can separate it in web service. Maybe it is possible to build string "param1=value1&param2=value2.." using this idea, but i have to get an index of current field.

Issue #1105 is now fixed, and the fix will be in Orbeon Forms 4.5.

Related

Show field based on another fields value using rules, WFFM, Sitecore8.1

I want to conditionally show a field in a web forms for marketers form in Sitecore 8.1.
My thoughts was that rules could be utilized to that. the only problem is that it seemingly does not work.
When I set a field to conditionally hide based on the value of another field, nothing happens when I satisfy the condition ie. enter the conditional value.
My intuition here is that the rule editor is not working on realtime on the form (by using JavaScript) but is only something that runs on the server.
Can anybody confirm this? Or otherwise send me the right direction towards realtime updating the form based on rules?
Greetings Mads Buch
You will require to use Javascript. What you can do is to create a custom rule which will be triggered via javascript. You can check the following link on how to create a custom rule https://jeffdarchuk.wordpress.com/2015/06/04/lets-use-that-rules-engine/
Also, you may create a custom type as suggested in this thread.
Thanks

Django form with autocomplete functionality

I am working on a django project with complex forms. In one of my form fields I need following functionality...... Its the text field. As the user starts typing the value the suggestions from existing database should appear in dropdown. Can anyone help me out with this ? Just similar to autocomplete but able to add new values.
This is going to be something in the JQuery/AJAX side of things, not Django. I would read up on the autocomplete functions of JQuery and use AJAX to call your DJango code and receive a populated list, which then displays to the user.
JQuery Autocomplete - Custom Data
If you don't want to deal with JavaScript, you can use a django application called django-autocomplete-light.
You can learn more about it (and get it) here: https://github.com/yourlabs/django-autocomplete-light

Split form into tabs in Django

I'm developing a Django app which has database driven form fields. I've followed this guide which seems to work so far.
I'm using Twitter Bootstrap and would like to split my fields into tabs. What would be the Django way to do this? Should I append the group label to the id of the form fields and somehow do the magic in the template? Should I use multiple forms in the same view (seems complicated)?
The end result HTML wise is to enclose the input fields in the correct div elements with the group's id like so.
I recently required the very same thing.
After some research, I used django-crispy-forms, which worked quite well. A more detailed instructions about the tabs (and the need of .js file for animation) can be found here, in the 'tabs' section.

Date Picker Styling Sitecore

I'm working on a sitecore project where i'm using WFFM (Web Forms For Marketers), I have a form and would like to change the styling of a date picker. By default it appears with -'s. I ant /'s.
One way would be:
$('.scfDatePickerTextBox').val().replace(/-/g,'/')
Theres no option to change the styles? that I know of? Any help guidance would be grateful.
When using WFFM as your forms builder i think it is not possible to style the dateformat.
When adding a date field, it always shows up as three droplists:
see this image: http://content.screencast.com/users/MoonCrawler/folders/Jing/media/627a9a76-de8d-4ad7-9097-81e21d38f54c/2013-01-30_1658.png
If you want to change styles (display) assign different css class. if your date is displayed with -'s in stead of /'s then i think you are using a custom form, you should be able configure the output of the date via the code behind file.
if this does not help, please provide sitecore version, WFFM version and type of form used.

How customize fields in the Django admin interface

I have a model in my Django project with a member which is a char field. Basically data in this field will be entered as comma-separated values.
Without a long-winded explanation of what the overall goal of this is, basically rather than having the admin interface use a simple text field, I'd rather have have some custom HTML for the form so I can just use checkboxes and assemble the values of the checked boxes into a CSV string myself once the form is submitted.
Most of the django customization I was able to find on Google didn't answer my particular problem.
If I understand your question correctly I think you want to search for writing custom widgets. Perhaps start here: http://docs.djangoproject.com/en/dev/topics/forms/