• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Updating the WebApp Input Form Dynamically

Engaged ,
Dec 27, 2016 Dec 27, 2016

Copy link to clipboard

Copied

Hi Everyone,

I have a web app pulls details from another app using a datasource field.  My entire set up works well, except my web app input form doesn't see to update itself with any web app items added after it was created.

For example this, from the web app input form...

<select name="CAT_Custom_12" id="CAT_Custom_12" class="cat_dropdown">

                        <option value=" ">-- Please select --</option>

                        <option value="13458838">Jennifer Jolin</option>

                        <option value="13458874">JoAnn Kelley</option>

                        <option value="13458920">Kim Kruth</option>

                        <option value="13458938">Michella Stanley</option>

                        <option value="13458846">Reva Ingles</option>

                        <option value="13458949">Robert Thompson</option>

</select>

Will not have any new names showing that were added after the form was created. What is the correct way to allow this form to automatically include items added AND items deleted at any time?

Many thanks, in advance.

TOPICS
Web apps

Views

922

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Enthusiast , Jan 03, 2017 Jan 03, 2017

Hi Teejay,

You will need to render the options with a webapps module list of items or liquid collection. Using liquid, you'll have something like:

<select name="CAT_Custom_12" id="CAT_Custom_12" class="cat_dropdown">

                        <option value=" ">-- Please select --</option>

                       {module_webapps render="collection" id="webappId|webappName" filter="all" sortType="ALPHABETICAL" collection="collectionName" template=""}

                         {% for item in collectionName.

...

Votes

Translate

Translate
Enthusiast ,
Jan 03, 2017 Jan 03, 2017

Copy link to clipboard

Copied

Hi Teejay,

You will need to render the options with a webapps module list of items or liquid collection. Using liquid, you'll have something like:

<select name="CAT_Custom_12" id="CAT_Custom_12" class="cat_dropdown">

                        <option value=" ">-- Please select --</option>

                       {module_webapps render="collection" id="webappId|webappName" filter="all" sortType="ALPHABETICAL" collection="collectionName" template=""}

                         {% for item in collectionName.items -%}

                         <option value="{{item.itemid}}"> {{item.name}} </option>

                         {% endfor -%}

</select>

This will render all the available items.

Please refer to module_webapps | Business Catalyst Developers  for more insight.

You might also want to use something like Typeahead so you don't end up with a mile tall dropdown typeahead.js – examples

I hope this helps.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jan 29, 2017 Jan 29, 2017

Copy link to clipboard

Copied

Hi Webmosphere!


Since I am unable to make this work. I have a few questions:

When it says id="webappId|webappName" do I put in the ID and WebAppName together like this:

id="41315|Individuals"

What does the "collectionName" refer to?

Many thanks!


Teejay

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jan 29, 2017 Jan 29, 2017

Copy link to clipboard

Copied

Here is the full code that I am using

<select name="CAT_Custom_12" id="CAT_Custom_12" class="cat_dropdown">

                        <option value=" ">-- Please select --</option>

                       {module_webapps render="collection" id="41315|Individuals" filter="all" sortType="ALPHABETICAL" collection="collectionName" template=""}

                         {% for item in collectionName.items -%}

                         <option value="{{item.itemid}}"> {{item.name}} </option>

                         {% endfor -%}

</select>

And I am using liquid.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jan 29, 2017 Jan 29, 2017

Copy link to clipboard

Copied

Hi Webmosphere!

I figured everything out except for the part where only the webApps they submitted will show. Right now all in the database show.

Thanks, Teejay

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jan 29, 2017 Jan 29, 2017

Copy link to clipboard

Copied

To show only items submitted by a customer, you need to use {module_webappcustomer} instead of {module_webapps}

{module_webappcustomer} is documented here: module_webappscustomer | Business Catalyst Developers

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jan 29, 2017 Jan 29, 2017

Copy link to clipboard

Copied

Applied this, but it is not pulling the customer's submitted apps. (See below) I have the app's Role Responsibility assigned to the USER. Am I missing something? I could see anything different in the documentation. You are my hero. Thanks for your assistance. I will keep plugging away as I await your response. - Thanks, Teejay

<select name="CAT_Custom_12" id="CAT_Custom_12" class="cat_dropdown">

     <option value=" ">-- Please select --</option>

     {module_webappcustomer render="collection" id="Individuals" filter="all" sortType="ALPHABETICAL" collection="Individuals" template=""}

     {% for item in Individuals.items -%}

     <option value="{{item.itemid}}"> {{item.name}} </option>

     {% endfor -%}

</select>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jan 29, 2017 Jan 29, 2017

Copy link to clipboard

Copied

Role responsible is associated with site admins. What you want is Submitted By...as indicated in the image below.submittedBy.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jan 29, 2017 Jan 29, 2017

Copy link to clipboard

Copied

LATEST

Yes, I have the set-up where members log into a secure zone, and with their identity they create web app items. I have it set for USERS to be role responsible.

Thanks Teejay

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jan 29, 2017 Jan 29, 2017

Copy link to clipboard

Copied

Never mind! I copied your  mention of {module_webappcustomer} when I saw in the documentation that it was {module_webappscustomer}. Put the "s" in there and we have champagne!


Take care over there and thanks!

Teejay

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jan 29, 2017 Jan 29, 2017

Copy link to clipboard

Copied

Oops! My mistake.

Glad you figured it out.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines