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...
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...
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...
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
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...
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...
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"> {...
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...
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...
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) ...
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...
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...
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?