Skip to content

نمونه‌های عملی


ساخت دکمهٔ ساده

Python
simple_button = {
    "id": "1",
    "type": "Simple",
    "button_text": "کلیک کنید"
}

ساخت دکمهٔ انتخاب از لیست

Python
selection_button = {
    "id": "2",
    "type": "Selection",
    "button_text": "انتخاب رنگ",
    "button_selection": {
        "selection_id": "color_picker",
        "search_type": "Local",
        "get_type": "Local",
        "is_multi_selection": False,
        "columns_count": "2",
        "title": "رنگ مورد نظر را انتخاب کنید",
        "items": [
            {"text": "قرمز", "type": "TextOnly"},
            {"text": "آبی", "type": "TextOnly"},
            {"text": "سبز", "type": "TextOnly"}
        ]
    }
}

ساخت دکمهٔ تقویم

Python
calendar_button = {
    "id": "3",
    "type": "Calendar",
    "button_text": "انتخاب تاریخ",
    "button_calendar": {
        "type": "DatePersian",
        "min_year": "1400",
        "max_year": "1410",
        "title": "تاریخ تولد خود را انتخاب کنید"
    }
}

ساخت دکمهٔ ورودی متن

Python
textbox_button = {
    "id": "4",
    "type": "Textbox",
    "button_text": "نظر خود را بنویسید",
    "button_textbox": {
        "type_line": "MultiLine",
        "type_keypad": "String",
        "place_holder": "نظر خود را اینجا وارد کنید...",
        "title": "فرم نظرسنجی"
    }
}