BoldSign AI Assistant
Chat with the BoldSign AI AssistantHow to Show Custom Form Fields with Branding
BoldSign supports displaying custom form fields to users when creating templates or documents with a brand that has custom fields configured. This article will guide you on how to display custom form fields using branding via the API.
To display the custom form fields, set ShowSharedCustomFields to true when updating branding via the API.
Below are a few code examples demonstrating how to display custom form fields using branding.
Code snippet
curl -X POST 'https://api.boldsign.com/v1/brand/edit?brandId=18779cd3-xxxx-xxxx-883e-4d9ead5c699a' \
-H 'X-API-KEY: {Your API Key}' \
-F 'brandName=BoldSign' \
-F 'brandLogo={Your Brand logo}' \
-F 'backgroundColor=red' \
-F 'buttonColor=green' \
-F 'buttonTextColor=white' \
-F 'emailDisplayName={SenderName} from BoldSign' \
-F 'redirectUrl=https://www.syncfusion.com/' \
-F 'isDefault=true' \
-F 'canHideTagLine=false' \
-F 'combineAuditTrail=true' \
-F 'hideDecline=false' \
-F 'hideSave=false'\
-F 'showBuiltInFormFields=true' \
-F 'allowCustomFieldCreation=true' \
-F 'showSharedCustomFields=true' \
using BoldSign.Api;
using BoldSign.Model;
var apiClient = new ApiClient("https://api.boldsign.com", "{Your API Key}");
var brandingClient = new BrandingClient(apiClient);
var editbrand = new BrandSettings()
{
BrandName = "BoldSign",
BrandLogo = new ImageFileBytes()
{
ContentType = "image/png",
FileBytes = File.ReadAllBytes("{Your file path}"),
},
BackgroundColor = "red",
ButtonColor = "Green",
ButtonTextColor = "White",
EmailDisplayName = "{SenderName} from BoldSign",
RedirectUrl = " https://www.syncfusion.com/ ",
IsDefault = true,
CanHideTagLine = false,
CombineAuditTrail = true,
HideDecline = false,
HideSave = false,
ShowBuiltInFormFields = true,
AllowCustomFieldCreation = true,
ShowSharedCustomFields = true,
};
BrandingData brandingData = await brandingClient.EditBrandAsync("18779cd3-xxxx-xxxx-883e-4d9ead5c699a", editbrand).ConfigureAwait(false);
string brandId = brandingData.BrandId;
Console.WriteLine(brandId);
import boldsign
configuration = boldsign.Configuration(host = "https://api.boldsign.com", api_key = "YOUR_API_KEY")
with boldsign.ApiClient(configuration) as api_client:
branding_api = boldsign.BrandingApi(api_client)
brand_updated = branding_api.edit_brand(
brand_id = "YOUR_BRAND_ID",
brand_name = "BoldSign",
brand_logo = "YOUR_FILE_PATH",
background_color = "red",
button_color = "Green",
button_text_color = "White",
email_display_name = "{SenderName} from BoldSign",
redirect_url = " https://www.syncfusion.com/ ",
is_default = True,
can_hide_tag_line = False,
combine_audit_trail = True,
hide_decline = False,
hide_save = False,
show_built_in_form_fields = True,
allow_custom_field_creation = True,
show_shared_custom_fields = True,
)
<?php require_once "vendor/autoload.php";
use BoldSign\Configuration;
use BoldSign\Api\BrandingApi;
$config = new Configuration();
$config->setHost("https://api.boldsign.com");
$config->setApiKey('YOUR_API_KEY');
$branding_api = new BrandingApi($config);
$brand_updated = $branding_api->editBrand(
$brand_id = "YOUR_BRAND_ID",
$brand_name = "BoldSign",
$brand_logo = 'YOUR_FILE_PATH',
$background_color = "red",
$button_color = "Green",
$button_text_color = "White",
$email_display_name = "{SenderName} from BoldSign",
$disclaimer_description = null,
$disclaimer_title = null,
$redirect_url = "https://www.syncfusion.com/",
$is_default = true,
$can_hide_tag_line = false,
$combine_audit_trail = true,
$combine_attachments = false,
$exclude_audit_trail_from_email = false,
$email_signed_document = 'Attachment',
$document_time_zone = null,
$show_built_in_form_fields = true,
$allow_custom_field_creation = true,
$show_shared_custom_fields = true
);
ApiClient client = Configuration.getDefaultApiClient();
client.setBasePath("https://api.boldsign.com");
client.setApiKey("YOUR_API_KEY");
BrandingApi brandingApi = new BrandingApi(client);
File brandLogo = new File("YOUR_FILE_PATH");
String backgroundColor = "red";
String buttonColor = "Green";
String buttonTextColor = "White";
String emailDisplayName = "{SenderName} from BoldSign";
String redirectUrl = "https://www.syncfusion.com/";
Boolean isDefault = true;
Boolean canHideTagLine = false;
Boolean combineAuditTrail = true;
Boolean showBuiltInFormFields = true;
Boolean allowCustomFieldCreation = true;
Boolean showSharedCustomFields = true;
BrandCreated brandUpdated = brandingApi.editBrand(
"YOUR_BRAND_ID",
"BoldSign",
brandLogo,
backgroundColor,
buttonColor,
buttonTextColor,
emailDisplayName,
null,
null,
redirectUrl,
isDefault,
canHideTagLine,
combineAuditTrail,
null,
null,
null,
null,
showBuiltInFormFields,
null,
null,
null,
null,
allowCustomFieldCreation,
showSharedCustomFields,
null,
null,
null,
null,
null,
null,
null,
null
);
import { BrandingApi } from "boldsign";
import * as fs from 'fs';
const brandingApi = new BrandingApi("https://api.boldsign.com");
brandingApi.setApiKey("YOUR_API_KEY");
const brandUpdated = brandingApi.editBrand(
"YOUR_BRAND_ID",
"BoldSign",
fs.createReadStream("YOUR_FILE_PATH"),
"red",
"Green",
"White",
"{SenderName} from BoldSign",
undefined,
undefined,
"https://www.syncfusion.com/",
true,
false,
true,
undefined,
undefined,
undefined,
undefined,
true,
undefined,
undefined,
undefined,
undefined,
true,
true
);
Replace brandId with the ID of the existing brand to be used for sending the document. Update brandname,emailDisplayName and brandlogo according to your brand's details. After executing the code, custom form fields will be displayed when a user creates templates or documents using the updated brand.