Copy link to clipboard
Copied
I have created two web apps.
1- ABC
2- XYZ
In XYZ, I have created a data source field(ABC). I want my customers can add/edit ABC and XYZ web app items. I have a page for both where we have form for adding/creating web app items. If we add some ABC web app item it does not shown in "XYZ" form. What to do to make the form automatically updated and sync with ABC web app items?
Please help,
Thanks for your time,
Imran
Copy link to clipboard
Copied
Hi Imran,
The data source, on the web app item creation form, unfortunately isn't populated dynamically. So, you'd have to add new items manually in this case. I believe this is on the wishlist and I encourage you to vote for it http://www.businesscatalyst.com/wish-list/list-public
Cheers,
Mario
Copy link to clipboard
Copied
Hey Mario, is there any progress with this? I know there are big things happening with web apps in 2013 and was wondering if this was on the list?
Copy link to clipboard
Copied
any progress on this Mario?
also, the 'wish-list' link goes to a 404 page, does this live some where now?
Copy link to clipboard
Copied
Hi Tim,
You can do this with a workaround. First, create a custom list template and write:
<option value="{tag_itemid}">{tag_name_nolink}</option>
Next, replace the option elements in your dropdown with the module (of course, use your own webapp id and template url):
<select name="CAT_Custom_294547">
<option value="">-- Please select --</option>
{module_webapps,18235,a template="/Layouts/WebApps/my_web_app/list_dropdown.tpl",,,,true,500,,1}
</select>
Copy link to clipboard
Copied
Hi Adam
What a great workaround.
It works fine in my web app but I have a question.
I am making a "job" database where we can add all of the jobs/assignments we are working on so it gives us an overview.
So i am using it to load out clients from a seperate web app. The problem is that if i want to edit or show the content of that tag it
can't display it. I am thinking that it can't save the option selected because the field i have made for this dont have these values.
My question is what kind of field do you use, in your example "<select name="CAT_Custom_294547">".
I have tried with a dropdown, but it can't save the option selected, and as i said i think it is because the option dont exist in the
field i am trying to save it to.
I hope this makes sense and there is a solution for this
Copy link to clipboard
Copied
Have solved most of the problems, but in the edit template it wont load the value already selected in that dropdown.
The problem is that then i need to select it again every time.
I am using the dropdown for client, and i use the edit template to register the hours spend on the assignment.
The problem is that it loads the option values into the dropdown, but the one selected when i made the web app item
is not selected.
Any ideas or tips?
Copy link to clipboard
Copied
Hi Peter,
The selection will have to be set with js. I don't often advocate putting scripts inline, but this is one way to do it:
<select name="CAT_Custom_294484">
<option value=" ">-- Please select --</option>
{module_webapps,18235,a template="/Layouts/WebApps/my_web_app/list_dropdown.tpl",,,,true,500,,1}
<script>$('option[value="{tag_appropriate tag}"]').attr("selected","selected");</script>
</select>
Probably a better way would be to add the tag to a data attribute, and then call your script from elsewhere:
<select class="myselect" name="CAT_Custom_294484" data-optionvalue="{tag_appropriate tag}">
<option value=" ">-- Please select --</option>
{module_webapps,18235,a template="/Layouts/WebApps/my_web_app/list_dropdown.tpl",,,,true,500,,1}
</select>
<script>
var myselect = $('.myselect');
myselect.find('option[value="'+myselect.data('optionvalue')+'"]').attr('selected','selected');
</script>
Copy link to clipboard
Copied
DAMN!
Another great fix!
Thanks a lot....
Is there any way to use this in the "web app search form" because it doesn't seem to be possible to use the datasource field for searching?
When i just used a dropdown with no datasource i could search on the assignments on the specific client, but that is not possible out of the box with datasource?
Any fix for this? I can live with "just" searching the job number which is already working!
EDIT: This was not a problem after all, I don't know why it didn't work the first time!
Thanks again Adam for your great workarounds, they are much appreciated!