Skip to main content
Hi there, Currently I have a formstack page. Within I see that I can add Javascript Code to the Send Button which is located at the bottom of the page. How can I link that button to a custom checkbox field that I have created in Salesforce.

For simplicity, I have added that field within that page. By default it is shown as a unselected checkbox. I want the checkbox to be checked when the button is pressed. Is there anyways that I can do that?

I have included my setup as well as the front end of the form below. Currently when I press the button 'Attach Pictures', the checkbox/custom field is not updated.

Any help is greatly appreciated, thanks. 

How to link FormStack button to custom field on SalesforceFront End
1 answer
  1. Sep 6, 2018, 7:47 AM
    Hi simon

    is that classic version?

    in my opinion if you might want to use that in lightning,

    component side

    <aura:component implements="flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId" access="global" >

    <div class="c-container">

    <lightning:layout multipleRows="true">

    <lightning:layoutItem size="12" padding="around-small">

    <lightning:button class="brand" label="Enter some text" onclick="{!c.handleChange}" />

    <lightning:input aura:id="checkbox1" type="checkbox" label="Basic option" name="input1" checked="false" default="false"/>

    </lightning:layoutItem>

    </lightning:layout>

    </div>

    </aura:component>

    controller side

    ({

    handleChange : function(component, event, helper) {

    var func = component.find("checkbox1").set("v.checked",true);

    }

    })

    you have to use button onclick when its checked  -> set("v.checked", true);

     
0/9000