통합
데이터 요소 만들기
AEM Forms as a Cloud Service
Tags 속성에서 두 개의 새 데이터 요소(AppliancesStateOfResidence 및 validationError)를 추가했습니다.
지원자주국
다음 지원자주국 다음을 선택하여 데이터 요소를 구성했습니다. 코어 확장 프로그램 드롭다운 및 사용자 지정 코드 아래 스크린샷에 표시된 대로 데이터 요소 유형용
다음 사용자 지정 코드를 사용하여 상태 적응형 양식 필드.
// use the GuideBridge API to access adaptive form elements
//The state field's SOM expression is used to access the state field
var ApplicantsStateOfResidence = guideBridge.resolveNode("guide[0].guide1[0].guideRootPanel[0].state[0]").value;
_satellite.logger.log("Returning Applicants State Of Residence is "+ApplicantsStateOfResidence);
return ApplicantsStateOfResidence;
validationError
다음 유효성 검사 오류 다음을 선택하여 데이터 요소를 구성했습니다. 코어 확장 프로그램 드롭다운 및 사용자 지정 코드 아래 스크린샷에 표시된 대로 데이터 요소 유형용
다음 사용자 지정 코드가 작성되어 validationError
데이터 요소 값입니다.
var validationError = "";
// Using GuideBridge API to access adaptive forms fields using the fields SOM expression
var tel = guideBridge.resolveNode("guide[0].guide1[0].guideRootPanel[0].telephone[0]");
var email = guideBridge.resolveNode("guide[0].guide1[0].guideRootPanel[0].email[0]");
_satellite.logger.log("Got tel in Tags custom script "+tel.isValid)
_satellite.logger.log("Got email in Tags custom script "+email.isValid)
if (tel.isValid == false) {
validationError = "error: telephone number";
_satellite.logger.log("Validation error is "+ validationError);
}
if (email.isValid == false) {
validationError = "error: invalid email";
_satellite.logger.log("Validation error is "+ validationError);
}
return validationError;
다음 단계
recommendation-more-help
4859a77c-7971-4ac9-8f5c-4260823c6f69