Search found 460 matches

by webform
Fri Apr 26, 2024 2:05 pm
Forum: Modules/Add-Ons
Topic: LISE Smarty tag in an UDT
Replies: 3
Views: 106

Re: LISE Smarty tag in an UDT

Doh! I totally forgot to check the error log. Sadly it didn't contains much info, so it's no help at all:

Code: Select all

[26/Apr/2024:15:36:59 +0200] "POST /admin/moduleinterface.php" 500
by webform
Fri Apr 26, 2024 1:42 pm
Forum: Modules/Add-Ons
Topic: LISE Smarty tag in an UDT
Replies: 3
Views: 106

LISE Smarty tag in an UDT

I have an UDT which gets data from one LISE Instance while presave to another LISE Instance, but it's not working (Server Error 500): $item = $params['item_object']; $id = $item->project; $smarty_data = "{LISEProjects action='detail' item='".$id."' template_detail='foo'}"; //Save...
by webform
Thu Mar 21, 2024 2:12 pm
Forum: Modules/Add-Ons
Topic: Passing Default values to FormBuilder Multiselect
Replies: 7
Views: 26214

Re: Passing Default values to FormBuilder Multiselect

After thinking about it a bit more, I have managed to pass an array of values to a multiselect field in FormBuilder. I converted my selected values to an array and then FormBuilder wanted to accept the data. {$title = $item->title} {assign var='category' value=','|explode:"{$item->category}&quo...
by webform
Thu Mar 21, 2024 8:43 am
Forum: Modules/Add-Ons
Topic: Passing Default values to FormBuilder Multiselect
Replies: 7
Views: 26214

Re: Passing Default values to FormBuilder Multiselect

Normally I use the default template, where I adapt it to be usable with Bootstrap. And it works fantastic in most cases, but in this case I will probably have to make a custom html template as you suggest, so that I can get many select values into a multiselect field. (I'm building a frontend editin...
by webform
Wed Mar 20, 2024 9:07 pm
Forum: Modules/Add-Ons
Topic: Passing Default values to FormBuilder Multiselect
Replies: 7
Views: 26214

Re: Passing Default values to FormBuilder Multiselect

Yeah, i need to take my thinking hat on and look into if i could recreate the multiselect field manually in the form template, so i can preselect the multiselect values i need :-\
by webform
Wed Mar 20, 2024 6:53 pm
Forum: Modules/Add-Ons
Topic: Passing Default values to FormBuilder Multiselect
Replies: 7
Views: 26214

Re: Passing Default values to FormBuilder Multiselect

I use the fields ID to pass default values like value_fld12='value1,value,2,value3' , where the field is a Multiselect Field Type. And default value IS passed if there is only one value but not if there is multiple values, like in the example above. So it may not work to pass multiple values to a Mu...
by webform
Wed Mar 20, 2024 11:27 am
Forum: Modules/Add-Ons
Topic: Passing Default values to FormBuilder Multiselect
Replies: 7
Views: 26214

Passing Default values to FormBuilder Multiselect

I'm trying to pass default values to a FormBuilder Multiselect field and it works just fine with a single value but not with multiple values. {FormBuilder form='MyForm' value_TITLEFIELD='My Title' value_MULTISELECTFIELD='value1,value,2,value3'} The help says "It may not work for more exotic fie...
by webform
Tue Mar 12, 2024 10:13 am
Forum: Modules/Add-Ons
Topic: LISE Custom Search Template
Replies: 2
Views: 26673

Re: LISE Custom Search Template

Thank a lot Velden, that did the trick and my actionid is now consistent through all fields. My final custom search template: {$form_actionid = $actionid} <div id="{$modulealias}_search" class="card bg-contrast-0 rounded-6 border-0 shadow"> <div class="card-body p-5"> {...
by webform
Mon Mar 11, 2024 11:39 am
Forum: Modules/Add-Ons
Topic: LISE Custom Search Template
Replies: 2
Views: 26673

LISE Custom Search Template

I am confused about how to create a custom search template. I have a number of select fields, but after each select the actionid for the subsequent fields changes and the search fails. Here is an example of a custom search template: <div id="{$modulealias}_search" class="card bg-contr...
by webform
Fri Mar 01, 2024 11:35 am
Forum: Modules/Add-Ons
Topic: LISE frontend form (FormBuilder) with default values fails
Replies: 1
Views: 244

Re: LISE frontend form (FormBuilder) with default values fails

I have kinda solved it with a bit of a hack: In my LISE detail template i set my variables i need in my comment form: {$lesson_title="{$item->title}" scope=global} {$lesson_id="{$item->serial}" scope=global} Then in my form i use hidden fields to get the variables with "Proc...
by webform
Thu Feb 29, 2024 1:49 pm
Forum: Modules/Add-Ons
Topic: LISE frontend form (FormBuilder) with default values fails
Replies: 1
Views: 244

LISE frontend form (FormBuilder) with default values fails

I have discovered an interesting problem, that if you set a default value for a FormBuilder form, which sends form results to LISE, you get a Database error. {FormBuilder form='capture_comment' value_fld83=$item->title value_fld82=$item->serial} LISE Database error: 0 - - Query: SELECT COUNT(alias) ...
by webform
Wed Feb 21, 2024 12:42 pm
Forum: Modules/Add-Ons
Topic: LISE API Auto Generate URL from Frontend Form
Replies: 1
Views: 327

Re: LISE API Auto Generate URL from Frontend Form

I couldn't figure out how to get the GenerateSlug API to work, so i did a work around where i generates the slug based on an uniq serial field and the title field: /** * Load wanted LISE instance, where you wan't to save items. * If instance can't be loaded, it will silently return. */ $mod = \cms_u...
by webform
Mon Feb 19, 2024 3:08 pm
Forum: Modules/Add-Ons
Topic: LISE API Auto Generate URL from Frontend Form
Replies: 1
Views: 327

LISE API Auto Generate URL from Frontend Form

I'm trying to trigger a GenerateSlug for items submitted from a frontend form. I have this code in my UDT, but the URL field remains empty: $obj->slug = LISE\api::GenerateSlug($params['title'], 'LISEINSTANCE'); I'm guessing the field name is wrong, and changed the code to: $obj->url = LISE\api::Gene...
by webform
Wed Feb 14, 2024 2:27 pm
Forum: Modules/Add-Ons
Topic: Display LISE categories hierarchy position without leading zeroes
Replies: 2
Views: 31249

Display LISE categories hierarchy position without leading zeroes

I know i can display LISE categories hierarchy position with {$category->hierarchy}, but how do i remove the leading zeroes like 00001.00016 => 1.16?
I can use |ltrim:'0' on the first part but what about the second part after the decimal point?

Go to advanced search