raha-ab این فرم bmi هستش ، چطوری شبیه این بسازم؟
سلام وقتتون بخیر
برای همچین فرمی باید با استفاده از PHP و جاوا اسکریپت یا HTML و JS چنین فرمی بسازید و برای هر قسمتش شرط تعیین کنید. توی گراویتی فرم امکان شرطی کردن هست ولی باید روش کار کنید و در اکثر مواقع زیاد دستورات شرطی رو نمی تونه درست اجرا کنه.
یک نمونه فرم BMI شرطی گراویتی فرم براتون ساختم می تونید درون ریزی و تست کنید:
{"0":{"title":"\u062a\u0633\u062a \u0628\u06cc \u062a\u0627\u06a9","description":"","labelPlacement":"top_label","descriptionPlacement":"below","button":{"type":"text","text":"\u0627\u0631\u0633\u0627\u0644","imageUrl":"","width":"auto","location":"bottom","layoutGridColumnSpan":12},"fields":[{"type":"number","id":1,"formId":14,"label":"qad","adminLabel":"","isRequired":false,"size":"large","errorMessage":"","visibility":"visible","inputs":null,"numberFormat":"decimal_dot","description":"","allowsPrepopulate":false,"inputMask":false,"inputMaskValue":"","inputMaskIsCustom":false,"maxLength":"","inputType":"","labelPlacement":"","descriptionPlacement":"","subLabelPlacement":"","placeholder":"","cssClass":"","inputName":"","noDuplicates":false,"defaultValue":"","enableAutocomplete":false,"autocompleteAttribute":"","choices":"","conditionalLogic":"","enableCalculation":false,"rangeMin":"","rangeMax":"","calculationFormula":"","productField":"","layoutGridColumnSpan":"","enableEnhancedUI":0,"layoutGroupId":"6484e17c","multipleFiles":false,"maxFiles":"","calculationRounding":"","disableQuantity":false,"displayAllCategories":false,"useRichTextEditor":false,"errors":[],"fields":"","displayOnly":""},{"type":"number","id":4,"formId":14,"label":"vazn","adminLabel":"","isRequired":false,"size":"large","errorMessage":"","visibility":"visible","inputs":null,"numberFormat":"decimal_dot","description":"","allowsPrepopulate":false,"inputMask":false,"inputMaskValue":"","inputMaskIsCustom":false,"maxLength":"","inputType":"","labelPlacement":"","descriptionPlacement":"","subLabelPlacement":"","placeholder":"","cssClass":"","inputName":"","noDuplicates":false,"defaultValue":"","enableAutocomplete":false,"autocompleteAttribute":"","choices":"","conditionalLogic":"","enableCalculation":false,"rangeMin":"","rangeMax":"","calculationFormula":"","productField":"","layoutGridColumnSpan":12,"enableEnhancedUI":0,"layoutGroupId":"7ebaa56e","multipleFiles":false,"maxFiles":"","calculationRounding":"","disableQuantity":false,"displayAllCategories":false,"useRichTextEditor":false,"errors":[],"fields":"","displayOnly":""},{"type":"number","id":3,"formId":14,"label":"\u0645\u062d\u0627\u0633\u0628\u0647 \u062d\u062c\u0645 \u062a\u0648\u062f\u0647 \u0628\u062f\u0646","adminLabel":"","isRequired":false,"size":"large","errorMessage":"","visibility":"visible","inputs":null,"numberFormat":"decimal_dot","description":"","allowsPrepopulate":false,"inputMask":false,"inputMaskValue":"","inputMaskIsCustom":false,"maxLength":"","inputType":"","labelPlacement":"","descriptionPlacement":"","subLabelPlacement":"","placeholder":"","cssClass":"","inputName":"","noDuplicates":false,"defaultValue":"","enableAutocomplete":false,"autocompleteAttribute":"","choices":"","conditionalLogic":"","enableCalculation":true,"rangeMin":"","rangeMax":"","calculationFormula":"{vazn:4} \/ ( {qad:1} * {qad:1} ) * 10000","productField":"","layoutGridColumnSpan":12,"enableEnhancedUI":0,"layoutGroupId":"22adc8f0","multipleFiles":false,"maxFiles":"","calculationRounding":"1","disableQuantity":false,"displayAllCategories":false,"useRichTextEditor":false,"errors":[],"fields":"","displayOnly":""},{"type":"html","id":8,"formId":14,"label":"\u062a\u0648\u0636\u06cc\u062d\u0627\u062a \u067e\u06cc\u0634 \u0641\u0631\u0636 \u0632\u06cc\u0631 \u0641\u0631\u0645","adminLabel":"","isRequired":false,"size":"large","errorMessage":"","visibility":"visible","inputs":null,"displayOnly":true,"description":"","allowsPrepopulate":false,"inputMask":false,"inputMaskValue":"","inputMaskIsCustom":false,"maxLength":"","inputType":"","labelPlacement":"","descriptionPlacement":"","subLabelPlacement":"","placeholder":"","cssClass":"","inputName":"","noDuplicates":false,"defaultValue":"","enableAutocomplete":false,"autocompleteAttribute":"","choices":"","conditionalLogic":{"enabled":true,"actionType":"show","logicType":"all","rules":[{"fieldId":"3","operator":"is","value":"0"}]},"content":"\u0628\u0631\u0627\u06cc \u062f\u0631\u06cc\u0627\u0641\u062a \u0646\u062a\u06cc\u062c\u0647 \u0644\u0637\u0641\u0627 \u0627\u0639\u062f\u0627\u062f \u062f\u0631\u062e\u0648\u0627\u0633\u062a\u06cc \u0641\u0631\u0645 \u0631\u0627 \u0648\u0627\u0631\u062f \u06a9\u0646\u06cc\u062f","disableMargins":"","productField":"","layoutGridColumnSpan":12,"enableEnhancedUI":0,"layoutGroupId":"e7ab9d97","multipleFiles":false,"maxFiles":"","calculationFormula":"","calculationRounding":"","enableCalculation":"","disableQuantity":false,"displayAllCategories":false,"useRichTextEditor":false,"errors":[],"fields":""},{"type":"html","id":6,"formId":14,"label":"\u0634\u0645\u0627 \u0686\u0627\u0642 \u0647\u0633\u062a\u06cc\u062f","adminLabel":"","isRequired":false,"size":"large","errorMessage":"","visibility":"visible","inputs":null,"displayOnly":true,"description":"","allowsPrepopulate":false,"inputMask":false,"inputMaskValue":"","inputMaskIsCustom":false,"maxLength":"","inputType":"","labelPlacement":"","descriptionPlacement":"","subLabelPlacement":"","placeholder":"","cssClass":"","inputName":"","noDuplicates":false,"defaultValue":"","enableAutocomplete":false,"autocompleteAttribute":"","choices":"","conditionalLogic":{"enabled":true,"actionType":"show","logicType":"all","rules":[{"fieldId":"3","operator":">","value":"29.4"}]},"content":"\u0634\u0645\u0627 \u0686\u0627\u0642 \u0647\u0633\u062a\u06cc\u062f. \u0628\u0631\u0627\u06cc \u062f\u0631\u06cc\u0627\u0641\u062a \u0631\u0698\u06cc\u0645 \u0627\u06cc\u0646\u062c\u0627 \u06a9\u0644\u06cc\u06a9 \u06a9\u0646\u06cc\u062f","disableMargins":"","productField":"","layoutGridColumnSpan":"","enableEnhancedUI":0,"layoutGroupId":"cbb9fd05","multipleFiles":false,"maxFiles":"","calculationFormula":"","calculationRounding":"","enableCalculation":"","disableQuantity":false,"displayAllCategories":false,"useRichTextEditor":false,"errors":[],"fields":""},{"type":"html","id":7,"formId":14,"label":"\u0634\u0645\u0627 \u0644\u0627\u063a\u0631 \u0647\u0633\u062a\u06cc\u062f","adminLabel":"","isRequired":false,"size":"large","errorMessage":"","visibility":"visible","inputs":null,"displayOnly":true,"description":"","allowsPrepopulate":false,"inputMask":false,"inputMaskValue":"","inputMaskIsCustom":false,"maxLength":"","inputType":"","labelPlacement":"","descriptionPlacement":"","subLabelPlacement":"","placeholder":"","cssClass":"","inputName":"","noDuplicates":false,"defaultValue":"","enableAutocomplete":false,"autocompleteAttribute":"","choices":"","conditionalLogic":{"enabled":true,"actionType":"show","logicType":"all","rules":[{"fieldId":"3","operator":"<","value":"29.4"},{"fieldId":"3","operator":"isnot","value":"0"}]},"content":"\u062a\u0628\u0631\u06cc\u06a9\u060c \u0634\u0645\u0627 \u0644\u0627\u063a\u0631 \u0648 \u0633\u0627\u0644\u0645 \u0647\u0633\u062a\u06cc\u062f","disableMargins":"","productField":"","layoutGridColumnSpan":12,"enableEnhancedUI":0,"layoutGroupId":"09548790","multipleFiles":false,"maxFiles":"","calculationFormula":"","calculationRounding":"","enableCalculation":"","disableQuantity":false,"displayAllCategories":false,"useRichTextEditor":false,"errors":[],"fields":""}],"version":"2.6.1","id":14,"markupVersion":2,"nextFieldId":9,"useCurrentUserAsAuthor":true,"postContentTemplateEnabled":false,"postTitleTemplateEnabled":false,"postTitleTemplate":"","postContentTemplate":"","lastPageButton":null,"pagination":null,"firstPageCssClass":null,"confirmations":[{"id":"62cac43461270","name":"\u062a\u0627\u06cc\u06cc\u062f\u06cc\u0647 \u067e\u06cc\u0634\u0641\u0631\u0636","isDefault":true,"type":"message","message":"\u0627\u0632 \u062a\u0645\u0627\u0633 \u0634\u0645\u0627 \u0645\u062a\u0634\u06a9\u0631\u06cc\u0645! \u0628\u0647 \u0632\u0648\u062f\u06cc \u0628\u0627 \u0634\u0645\u0627 \u062a\u0645\u0627\u0633 \u0645\u06cc \u06af\u06cc\u0631\u06cc\u0645.","url":"","pageId":"","queryString":""}],"notifications":[{"id":"62cac4345ee11","isActive":true,"to":"{admin_email}","name":"\u0627\u0639\u0644\u0627\u0646 \u0645\u062f\u06cc\u0631\u06cc\u062a","event":"form_submission","toType":"email","subject":"\u0641\u0631\u0645 \u0627\u0631\u0633\u0627\u0644\u06cc \u062c\u062f\u06cc\u062f {form_title}","message":"{all_fields}"}]},"version":"2.6.1"}
بطور خلاصه شما باید از نوع فیلدهای استاندارد، گزینه HTML رو انتخاب کنید و سه فیلد بسازید. یکی برای متن پیش فرض وقتی که کاربر هنوز عددی وارد نکرده و یکی برای زمانی که طرف چاق هست و یکی وقتی لاغر هست. داخل این فیلد کد HTML می تونید استفاده کنید که می تونید عکس یا متن یا لینک و … رو قرار بدید.
بعد در قسمت شرطی بیاید تعریف کنید اگه عدد فیلد محاسبه از یک عدد بیشتر بود، فیلد چاق رو نشون بده و اگه کمتر بود فیلد لاغر!
شرط فیلد متن پیش فرض وقتی کاربر عددی وارد نکرده:

برای فیلد لاغر:

برای فیلد چاق:
