Separate corn from its cob (you don't use the cob) then grind it (once you've finished, put it into separated bowl) and add all-purpose flour mix it until everything are covered, set aside
Minced all at once red onion, garlic and chilli peppers (or leek) then add sugar + salt in-between (based on your preferences, tsp or a pinch, up to you)
Then add seasonings to grinded corn, mix it well
Add warm water (or coconut milk), make sure it wont turn into a runny type of mixture, then add egg, mix well
Then fry until golden brown (when it comes to frying, you can use a drop of its mixture 1stly, to determine it's hot enough to fry, once it's set, lowered the heat or you'll burn your fritters)
Enjoy it while it's still warm (you can use dipping sauce or enjoy it as it is)