jForms 0.4.1 fields options syntax

More
5 years 1 month ago #381 by giro
giro replied the topic: jForms 0.4.1 fields options syntax
Thanks for using jForms!
I'm going to create an updated demo, because the current demo is for an old version of jForms.
about the dynamic fields....I'll make sure to add an example with the ckdatetimepicker.
If I understand well, you wanna show/hide a field or anything else, triggered by the datetime selected in the ckdatetimepicker field, right?
If so, you simple have to add the following class to the element you wanna show/hide:
condRule[show,#my_ckdatetimepicker_input_id,VALUE_THE_CKDATETIMEPICKER_SHOULD_HAVE]

example:
condRule[show,#jform_mydatetime,31/12/2000]

Please Log in or Create an account to join the conversation.

  • Alex812
  • Alex812's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 1 month ago - 5 years 1 month ago #387 by Alex812
Alex812 replied the topic: jForms 0.4.1 fields options syntax
Thanks for the quick reply.
About my first question, I just added to /libraries/jdom/jform/fields/ckdatetimepicker.php
'selectableDays' => $this->getOption('selectableDays')
So.... it worked!

About triggered by the datetime
<fieldset name="basic"
label="MY_DEMO1_BASIC"
printable="true"
>
<field 
name="datetimepicker"
alias="datetimepicker"
label="MY_DEMO1_DATETIMEPICKER"
filter="STRING"
id="datetimepicker"
type="ckdatetimepicker"
uiFormat="D. d.m.Y"
format="d-m-Y"
calendars="3"
selectableDays="[0,6]"
autoclose="true"
startDate="today"
minView="days"
maxView="days"
startView="days"
/>
<field name="radiogroup"
alias="radiogroup"
label="MY_DEMO1_RADIOGROUP"
filter="STRING"
class="condRule[show,#jform_datetimepicker,23-11-2014]"
description="MY_DEMO1_DESC"
default="3"
type="ckradio"> 
<option value="0" icon="icomoon-database" color="default">MY_DEMO1_VAL_A</option>
<option value="1" icon="icomoon-key" color="success">MY_DEMO1_VAL_B</option>
</field>
</fieldset>
In this case the radiogroup field is it recording after submission , but not display after date selected in the form.

Also I am trying show/hide a field triggered by the day of the week (0-6). For example, if selected Sunday or Saturday and Sunday.
How I can do it?
Last Edit: 5 years 1 month ago by Alex812.

Please Log in or Create an account to join the conversation.

More
5 years 1 month ago #388 by giro
giro replied the topic: jForms 0.4.1 fields options syntax
Hi,
I'm just improving the API between the JS query plugin of the datetimepicker and the form builder. that selectableDays and some other options, were not included yet. I'll add those missing options and I'm planning to release an update today.

About the show/hide functionality, I'm currently improving the JS plugin what is involved in this feature, your case is a particular case, so I'm going to test this case, and I'll make sure it will work.

About this: "Also I am trying show/hide a field triggered by the day of the week (0-6). For example, if selected Sunday or Saturday and Sunday."
it's a bit tricky, but fortunally there is a way to do it on the next update, I'll give you more details later, because I'm currently working on it.

Please Log in or Create an account to join the conversation.

  • Alex812
  • Alex812's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 1 month ago #390 by Alex812
Alex812 replied the topic: jForms 0.4.1 fields options syntax
Thank you. You're doing fine. I will follow the news ..

Please Log in or Create an account to join the conversation.

  • Alex812
  • Alex812's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 1 month ago #397 by Alex812
Alex812 replied the topic: jForms 0.4.1 fields options syntax
I have another question. I'm trying to create a link to the form and pass parameters to the field on the form page (not on current page) .. I tried to do this with a plugin. I am sure that it can somehow make it. If I use this case,
{jforms:5 name=This is another example|preform=1}
So parameter is set to the current page. But I need to turn value on the form page after redirection How can I do it?
Alternatively, is it possible to pass the values via URL? Something like what:
/?frm=1&myfield=myvalue

Please Log in or Create an account to join the conversation.

More
5 years 1 month ago #401 by giro
giro replied the topic: jForms 0.4.1 fields options syntax
the jForms plugin does that, if doesn't work for you, it may means there is a misconfiguration or a bug, I'm currently completing the upgrade of jForms, I'll check the PREFORM feature, to make sure it perfectly works.
check tomorrow for the next coming release.

Please Log in or Create an account to join the conversation.

Fork me on GitHub
Cookies make it easier for us to provide you with our services. With the usage of our services you permit us to use cookies.
More information Ok